Ad

Laravel Can DailyAt Be Nested?

- 1 answer

Can dailyAt() be used in a nested way,

$schedule->command('foo')
         ->dailyAt('00:01')
         ->dailyAt('00:16');

Or it has to be like,

$schedule->command('foo')
         ->dailyAt('00:01');
$schedule->command('foo')
         ->dailyAt('00:16');
Ad

Answer

You can use the manual cron expression like this:

$schedule->command('foo')->cron('0 9,17 * * *');

This was already answered on this question: Laravel scheduler run twiceDaily at specific hours

Ad
source: stackoverflow.com
Ad