It is fairly clear that system_run_automated_cron() will also call hook_cron during a normal request if cron.php has not been run within the given threshold period. This should be noted in the documentation for hook_cron.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 1041440.patch | 708 bytes | jhodgdon |
Comments
Comment #1
arianek commentedapi docs, moving to core queue
Comment #2
jhodgdonOK. drupal_cron_run() is the function that actually invokes hook_cron(), and there are 5 functions in d7 that call it, plus cron.php. So the doc should be updated.
http://api.drupal.org/api/drupal/includes--common.inc/function/drupal_cr...
Comment #3
jhodgdonI think the best fix for the doc is just to delete that line, since the next paragraph explains when hook_cron() gets invoked.
Here's a patch.
Comment #4
kim-day commentedI tested the patch and it works correctly - looks good
Comment #5
jhodgdonmarking rtbc as per kim-day's review
Comment #6
jhodgdonNeeds to go to d8 and then d7
Comment #7
dries commentedCommitted to 8.x. Moving to 7.x.
Comment #8
webchickCommitted to 7.x. Thanks!