mardi 23 juin 2020

Laravel run batch of commands between hours

There are some commands:

protected function schedule(Schedule $schedule)
{
    $schedule->command('Events:complete')->everyFiveMinutes();
    $schedule->command('Payments:authorize')->everyFiveMinutes();
    $schedule->command('Requests:processing')->hourly();
}

Every one of them should be performed with their own periodicity. But I wanna add one more condition - run that commands only between 08:00 and 20:00. Can Laravel do it, or should I check time via pure php? Laravel 5.4



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire