You are here

public function Crontab::isScheduled in Ultimate Cron 8.2

Check job schedule.

Parameters

CronJob $job: The job to check schedule for.

Return value

boolean TRUE if job is scheduled to run.

Overrides SchedulerBase::isScheduled

File

src/Plugin/ultimate_cron/Scheduler/Crontab.php, line 128

Class

Crontab
Crontab scheduler.

Namespace

Drupal\ultimate_cron\Plugin\ultimate_cron\Scheduler

Code

public function isScheduled(CronJob $job) {
  $log_entry = isset($job->log_entry) ? $job->log_entry : $job
    ->loadLatestLogEntry();
  $skew = $this
    ->getSkew($job);
  $class = get_class($this);
  return $class::shouldRun($this->configuration['rules'], $log_entry->start_time, NULL, $this->configuration['catch_up'], $skew) ? TRUE : FALSE;
}