コード例 #1
0
 /**
  * Define the application's command schedule.
  *
  * @param SchedulingSchedule $schedule
  * @return void
  */
 protected function schedule(SchedulingSchedule $schedule)
 {
     if ($this->hasSchedule()) {
         // Add command to scheduler
         foreach (Schedule::active()->get() as $model) {
             /**@var Schedule $model */
             $command = $schedule->command($model->command)->cron($model->schedule);
             if (!$model->can_overlapping) {
                 $command->withoutOverlapping();
             }
         }
     }
 }