jeudi 25 août 2016

Laravel scheduler select from database

I want create a table to manage my schedule

something like that

class Kernel extends ConsoleKernel {    
  protected function schedule(Schedule $schedule)
  {
      $datas = \App\Schedule_list::All();
      foreach($datas as $data){
      schedule->command($data->command)
            ->cron($data->cron)
            ->withoutOverlapping();
      }
   }
}

Can i do something like that?

And I also want to store every command log to my table

Like Duration and Success or not

How can i do all of above?

Thanks!!!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire