You are here

function ultimate_cron_init in Ultimate Cron 8

Same name and namespace in other branches
  1. 6 ultimate_cron.module \ultimate_cron_init()
  2. 7.2 ultimate_cron.module \ultimate_cron_init()
  3. 7 ultimate_cron.module \ultimate_cron_init()

Implements hook_init().

File

./ultimate_cron.module, line 514
@todo Add filter on overview page. @todo Add log view (with graph). @todo Make proper markup for overview page. @todo Refactor drush stuff, too many intimate relations with Background Process @todo Refactor Cron % offset stuff. Too mixed up and…

Code

function ultimate_cron_init() {

  // No need for hocus pocus and poorman until site is installed.
  if (state()
    ->get('system.install_task') != 'done') {
    return;
  }
  $name = 'cron_last';
  if ($value = db_query("SELECT value FROM {variable} WHERE name = :name", array(
    ':name' => $name,
  ))
    ->fetchField()) {
    $value = unserialize($value);
  }
  global $conf;
  $conf['cron_last'] = $value;
  ultimate_cron_trigger_poorman();
}