On this page
function system_run_automated_cron
system_run_automated_cron()
Run the automated cron if enabled.
File
- modules/system/system.module, line 3531
- Configuration system that lets administrators modify the workings of the site.
Code
function system_run_automated_cron() {
// If the site is not fully installed, suppress the automated cron run.
// Otherwise it could be triggered prematurely by Ajax requests during
// installation.
if (($threshold = variable_get('cron_safe_threshold', DRUPAL_CRON_DEFAULT_THRESHOLD)) > 0 && variable_get('install_task') == 'done') {
$cron_last = variable_get('cron_last', NULL);
if (!isset($cron_last) || (REQUEST_TIME - $cron_last > $threshold)) {
drupal_cron_run();
}
}
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!system!system.module/function/system_run_automated_cron/7.x