예제 #1
0
 /**
  * @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;
     }
 }
예제 #2
0
 /**
  * @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;
         }
     }
 }