App\Console\Kernel::schedule PHP Method

schedule() protected method

Define the application's command schedule.
protected schedule ( Illuminate\Console\Scheduling\Schedule $schedule ) : void
$schedule Illuminate\Console\Scheduling\Schedule
return void
    protected function schedule(Schedule $schedule)
    {
    }

Usage Example

Example #1
0
 /**
  * Define the application's command schedule.
  *
  * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
  * @return void
  */
 protected function schedule(Schedule $schedule)
 {
     parent::schedule($schedule);
     $schedule->command('crm-launcher:updateCases')->everyMinute()->when(function () {
         return Message::exists();
     });
     $schedule->command('crm-launcher:activity')->everyMinute()->when(function () {
         return Message::exists();
     });
     $schedule->command('crm-launcher:updateDashboardStats')->everyFiveMinutes();
     $schedule->command('crm-launcher:updatePublishmentStats')->everyFiveMinutes();
     $schedule->command('crm-launcher::resetNotified')->daily();
 }
Kernel