コード例 #1
0
 /**
  * Determine if the current schedule is due to be run
  *
  * @return bool
  */
 public function isDue()
 {
     $cron = App::make('Cron\\CronExpression', [$this->scheduler->getCronSchedule()]);
     // if a week is defined, so some special weekly stuff
     if ($this->scheduler->getScheduleWeek() !== Scheduler::NONE) {
         return $this->thisWeek() && $cron->isDue();
     }
     //otherwise us only standard cron scheduling
     return $cron->isDue();
 }
コード例 #2
0
 public function testGetCronSchedule()
 {
     $this->assertInstanceOf($this->schedulerClass, $this->scheduler->setSchedule(1, 2, 3, 4, 5, 6));
     $this->assertEquals($this->scheduler->getCronSchedule(), '4 3 5 2 1');
 }