You are here

function _scheduler_run_cron in Scheduler 6

Same name and namespace in other branches
  1. 5 scheduler.module \_scheduler_run_cron()
  2. 7 scheduler.cron.inc \_scheduler_run_cron()
2 string references to '_scheduler_run_cron'
scheduler_menu in ./scheduler.module
Implementation of hook_menu().
_scheduler_lightweight_cron in ./scheduler.module
Return the lightweight cron form to allow a manual run.

File

./scheduler.module, line 882

Code

function _scheduler_run_cron() {
  watchdog('scheduler', 'Internal scheduler cron run activated', array(), WATCHDOG_NOTICE);
  scheduler_cron();
  if (ob_get_level() > 0) {
    $handlers = ob_list_handlers();
    if (isset($handlers[0]) && $handlers[0] == 'default output handler') {
      ob_clean();
    }
  }
  watchdog('scheduler', 'Internal scheduler cron run completed', array(), WATCHDOG_NOTICE, l('settings', 'admin/settings/scheduler'));

  // This message is only seen when the lightweight cron is tested interactively.
  drupal_set_message(t("Scheduler's lightweight cron completed. See !log for details.", array(
    '!log' => l('admin/reports/dblog', 'admin/reports/dblog'),
  )));

  // Must return something so that an output page is created if testing the lightweight cron interactively.
  return ' ';
  exit;
}