Cron doesn't work in automatic mode. Only in manual. No errors or warning messages. I tried to use the "cron debug" module - also no errors and cron only runs in manual mode.
Can anybody help to understand this problem? Is there any solutions?
Thanks a lot.
Comments
Comment #1
1959mvp commentedSame here. On base install of commons, cron does not run as scheduled
Comment #2
tuwebo commentedHi,
Are you calling it explicity from any place?, something like (i.e.)
wget [options] <URL>Where
<URL>should be taken from /admin/config/system/cronOtherwise it shouldn't run, isn't it?
Comment #3
1959mvp commentedUsing the cron admin function inside drupal. Setting it for 12 hours, and it never runs. D7 is set to provide cron as part of the installation, accessible at /admin/config/system/cron.
Cron runs successfully on other D7 installations, but not in Commons....
Comment #4
fun.boojum commentedAbsolutly the same. Nothing to add.
Comment #5
fun.boojum commentedCalling site's (drupal commons) CRON with command:
wget <URL>works fine.
So it is possible to use it with an external cron.
But:
...it is not so obvious )))
Thank you, TuWebO.
Comment #6
tuwebo commentedHi fun.boojum,
You're right, cron should be executed when using auto running, but looking the code and talking with my workmates, this option is not really good.
How it works AFAIK, is:
- Dupal calls drupal_deliver_html_page
- this calls drupal_page_footer
- that calls system_run_automated_cron <------ HERE WE ARE
- this last one checks for DRUPAL_CRON_DEFAULT_THRESHOLD, wich is the variable we set in the /admin/config/system/cron, 10800 by default (in seconds == 3 hours)
That means that cron will be executed only when someone has done a page request, and that guy will get the cron run before getting the page, no good.
Then, maybe we have a starting point to look at. I will check if cron is performing well in my commons install, maybe it is a bug in commons.
We work with elysia_cron, that has another issue if you don't double check the threshold (in the /admin/config/system/cron) has been set to 0 before enable it (that's why I posted this tweet the other day https://twitter.com/TuWebO/status/481131323625852928).
I misunderstood auto run in drupal, know I think I got it clearly... but who knows.
Comment #7
tuwebo commentedCatch it!
Looks like the installation never calls to
variable_set('install_task', 'done');and...
system_run_automated_cronalways check this:variable_get('cron_safe_threshold', DRUPAL_CRON_DEFAULT_THRESHOLD)) > 0 && variable_get('install_task') == 'done'So, cron will never run.
In my installation, this variable has
'install_task' == commons_admin_permissionsSo I think this is a bug in the installation profile, changing the category and title.
Adding a patch for it.
Meanwhile, someone could test this code
variable_set('install_task', 'done');in devel/php for example, and see if it solve the problem (not in production sites of course).Comment #8
japerrySo I just found something interesting out on my install.. Can you check to see the contents of the variable 'install_task'?
Thats why my cron doesn't auto run. I'm checking on some other installs to see if this isn't a fluke.
PS.. muahahahah you beat me to it! good work, I' mtesting now.
Comment #9
fun.boojum commentedHi TuWebO,
That's great!
Thank you very much!
Comment #11
japerry