Hi,
I just set up 'Elysia Cron' on a larger Drupal site (D6) and noticed that within Drupal no Cron jobs appear to be executed anymore.
The module has been set up like documented in the instructions; there is a separate Crontab setting that is supposed to be executed every minute:
* * * * * wget -O - -q -t 1 http://mysite.tld/sites/all/modules/elysia_cron/cron.php
From the server's syslog:
…
May 18 18:41:01 ns225163 /USR/SBIN/CRON[12388]: (root) CMD (wget -O - -q -t 1 http://mysite.tld/sites/all/modules/elysia_cron/cron.php)
May 18 18:42:01 ns225163 /USR/SBIN/CRON[12456]: (root) CMD (wget -O - -q -t 1 http://mysite.tld/sites/all/modules/elysia_cron/cron.php)
May 18 18:43:01 ns225163 /USR/SBIN/CRON[12518]: (root) CMD (wget -O - -q -t 1 http://mysite.tld/sites/all/modules/elysia_cron/cron.php)
May 18 18:44:01 ns225163 /USR/SBIN/CRON[12587]: (root) CMD (wget -O - -q -t 1 http://mysite.tld/sites/all/modules/elysia_cron/cron.php)
May 18 18:45:01 ns225163 /USR/SBIN/CRON[12660]: (root) CMD (wget -O - -q -t 1 http://mysite.tld/sites/all/modules/elysia_cron/cron.php)
…To this point, Cron appears to be working fine (no errors, no indications of wrong paths etc.)
However, according to "Last run" at ./admin/build/cron, within Drupal no Cron jobs are executed ("Last run" is the time I ran it manually through the "Execute Cron" button).
At ./admin/build/cron/settings I enabled "extended logging (in watchdog)", nothing was logged in watchdog. When I ran Cron again manually, watchdog logged: "Cron channel default run completed."
Having to run Cron manually opposes the whole idea of Cron - executing Cron jobs in the background without user interference. So how do I get Elysia Cron to execute automatically?
Thanks!
Comments
Comment #1
gotheric commentedIf you enabled extended logging, and nothing is logged, means that elysia cron is not called at all.
You could try using directly the URL try http://mysite.tld/sites/all/modules/elysia_cron/cron.php in your browser to test the execution.
- Are you sure cron is enabled? (the "disable" setting is not turned on)
- Are you sure you have not specified a cron key or a ip limitation? If so, you should pass cron key via URL in wget, or assure you have specified the right IP
- Have you enabled other modules that control cron execution? Maybe these are incompatible with elysia cron, try disabling them
- Try calling the standard http://mysite.tld/cron.php and see if that way the cron runs (calling "/sites/all/..." is not mandatory)
- Try to reinstall the module
- Try to install the new 2.x.dev version (with a lot of improvements and fixes).
Comment #2
asb commentedThanks for your precise reply!
Result: White page after about 2 minutes; probably no WSOD (no record in Apache's error log). No record at
./admin/reports/dblog. With debugging turned on and callinghttp://mysite.tld/sites/all/modules/elysia_cron/cron.phpdirectly, watchdog logs: "No channels ready to be executed, skipping cron."At
./admin/build/cron/settings, the "Channel" fields in "Single job settings" are all empty. Put an "1" into them, repeaded manual call of 'Elysia Cron', same result: "No channels ready to be executed, skipping cron."Checked: "Global disable" at
./admin/build/cron/settingsis unchecked.Checked: No "Cron key" and no "Allowed hosts" limitation at
./admin/build/cron/settings.Hm... If so, I'm not aware of them. At
./admin/build/modules, 'Elysia Cron' is the only module with "Cron" in the module's name or description.Yes, calling
http://mysite.tld/cron.phpworks as with Vanilla Drupal Cron: Green message "Cron run successful", redirects to./admin/reports/status. The problem are automated Cron runs in the background.This to another problem:
This kills the complete site (WSOD on all pages), thus reverting to elysia_cron-6.x-2.1.
Comment #3
gotheric commentedIt seems an incompatibility with the latest D6, interesting...
I've just committed a fix in D6 dev branch, it will be downloadable in some hours (max 24 hours).
Let me know it this solve the issue
Comment #4
asb commented6.x-2.x-dev from 2013-May-03 was updated with the version from 2013-May-22 a few hours ago; I tried to install this new release and didn't encounter the WSOD as described in #2. The visual appearance of the Cron overview page has changed a bit, but so far the behaviour appears to be identical. I'll give an update in a couple of hours.
Comment #5
asb commentedYes, absolutely identical behaviour: Manually executing Cron works as usual, but absolutely no scheduling is being performed.
What does "No channels ready to be executed, skipping cron" mean (except that the module refuses to o it's job?
Comment #6
demoshane commentedExperiencing this as well
Comment #7
asb commentedObviously a "won't fix".
Comment #8
kenorb commentedRelated for 7.x: #1748106: "No channels ready to be executed, skipping cron." on every elysia cron run, #1952624: Automatic cron runs stop working: "No channels ready to be executed, skipping cron." on every run.
Comment #9
asb commentedNew server, trying 'elysia_cron' again on three sites (in the past decade, I had been using 'ultimate_cron', which also did not work reliably)
Now using 'elysia_cron' 6.x-2.2, LTS version, from Jan 19, 2023 (https://github.com/d6lts/elysia_cron) with PHP 7.3.31-1~deb10u6.
Results as of May 28, 2024 as shown at the respective ./admin/build/cron admin pages:
1) Last run: 24.05.2024 - 23:12
2) Last run: 25.05.2024 - 05:12
3) Last run: 25.05.2024 - 05:12
These were the times I ran cron manually via ./admin/reports/status/run-cron.
According to Legend, everything is in status: "Waiting for execution Job is ready to be executed, and is waiting for system cron call".
So after a decade, still the identical issue: Cron is not automatically executed according to the settings from crontab; the search index becomes quickly stale and also has to be manually updates (e.g. drush search-index); maintenance jobs like cleaning expired access logs or removing older rows from flood and batch table are not executed unattended.
Running cron manually from ./admin/build/cron takes an exec time between 25s, 51s, and 87s, so I guess timeouts should not be an issue. Really odd.