コード例 #1
0
 public function register()
 {
     $this->registerConsoleCommand(CronRunCommand::class);
     Event::listen('kernel.handled', function () {
         if (cms_installed() and config('job.agent', Job::AGENT_SYSTEM) === Job::AGENT_SYSTEM) {
             Job::runAll();
         }
     });
     Event::listen('view.settings.bottom', function () {
         $agents = Job::agents();
         echo view('cron::cron.settings', compact('agents'));
     });
 }
コード例 #2
0
 /**
  * Execute the console command.
  */
 public function fire()
 {
     Job::runAll();
     $this->info('All done');
 }