/** * @param \Cron\Job\JobInterface[] $jobs */ public function setJobs(array $jobs) { foreach ($jobs as $job) { $set = new ExecutorSet(); $set->setJob($job); $set->setReport($job->createReport()); $this->sets[] = $set; } }
/** * @param JobInterface[] $jobs */ protected function prepareSets(array $jobs) { foreach ($jobs as $job) { if ($job->valid(new \DateTime())) { $set = new ExecutorSet(); $set->setJob($job); $set->setReport($job->createReport()); $this->sets[] = $set; } } }