function system_run_automated_cron

Run the automated cron if enabled.

1 call to system_run_automated_cron()
drupal_page_footer in includes/common.inc
Performs end-of-request tasks.

File

modules/system/system.module, line 3573

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();
    }
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.