Ad

Scheduling Tasks In Laravel

- 1 answer

I'm building an application on Laravel 5.7 where I'm having a cron job to run following commands:

$schedule->command('telescope:clear')->timezone('Asia/Kolkata')->dailyAt('24:00');
$schedule->command('backup:clean')->timezone('Asia/Kolkata')->dailyAt('01:00');
$schedule->command('backup:run')->timezone('Asia/Kolkata')->dailyAt('01:30');

But this continously throws an exception which I found out in telescope:

cronjob error

Also the location states:

location trace

I don't know what is the mistake I'm doing I want to run command in midnight and then do a backup after one hour of clearing telescope entries. Help me out with this. Thanks.

Ad

Answer

There's no such time as 24:00. Use 00:00 instead.

Ad
source: stackoverflow.com
Ad