dimanche 22 janvier 2017

Laravel 5.2: How to scheduled Command multiple times in a day

I am using laravel 5.2 commands via scheduler, i can call the command by following code:

$schedule->command('command:name')
                ->dailyAt('08:55');

but now i want to call above command daily at six different times i.e. 8:45, 9:15, 9:45,10:15 etc

$schedule->command('emails:dailyMenuEmails')
            ->when(function(){return true;});

Above code, with when function, isn't working somehow, can someone suggest best practices of laravel.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire