You are here

function ultimate_cron_init in Ultimate Cron 7

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

Implements hook_init().

File

./ultimate_cron.module, line 531
@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 (variable_get('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();
}