You are here

function elysia_cron_should_run in Elysia Cron 7

Same name in this branch
  1. 7 elysia_cron_scheduler.inc \elysia_cron_should_run()
  2. 7 elysia_cron_scheduler_old.inc \elysia_cron_should_run()
Same name and namespace in other branches
  1. 5.2 elysia_cron_scheduler.inc \elysia_cron_should_run()
  2. 5.2 elysia_cron_scheduler_old.inc \elysia_cron_should_run()
  3. 5 elysia_cron_scheduler.inc \elysia_cron_should_run()
  4. 5 elysia_cron_scheduler_old.inc \elysia_cron_should_run()
  5. 6.2 elysia_cron_scheduler.inc \elysia_cron_should_run()
  6. 6.2 elysia_cron_scheduler_old.inc \elysia_cron_should_run()
  7. 6 elysia_cron_scheduler.inc \elysia_cron_should_run()
  8. 6 elysia_cron_scheduler_old.inc \elysia_cron_should_run()
  9. 7.2 elysia_cron_scheduler.inc \elysia_cron_should_run()
4 calls to elysia_cron_should_run()
elysia_cron_active_jobs in ./elysia_cron.module
Get all jobs that needs to be executed in a channel
elysia_cron_admin_page in ./elysia_cron.admin.inc
test_elysia_cron_should_run in ./elysia_cron_scheduler.inc
test_elysia_cron_should_run in ./elysia_cron_scheduler_old.inc

File

./elysia_cron_scheduler.inc, line 3

Code

function elysia_cron_should_run($conf, $now = -1) {
  $prev_rule_run = 0;

  // A che ora SAREBBE dovuto essere lanciato l'ultima volta
  if ($conf['disabled']) {
    return false;
  }
  if ($now < 0) {
    $now = time();
  }
  if (!$conf['last_run'] || $now - $conf['last_run'] > 365 * 86400) {
    return true;
  }
  $next_run = _elysia_cron_next_run($conf);
  return $now >= $next_run;
}