The Laravel scheduler says: "No scheduled commands are ready to run."

I installed the following command:

protected function schedule(Schedule $schedule)
{
    $schedule->command('feeds:fetch')->everyFiveMinutes();
}

I set the cron job to run php artisan schedule:run

When I run this line on the dev terminal, it launches the OK task. In Prod, it returns "No scheduled commands are ready to run."

Any way to fix this problem?

+4
source share
1 answer

Great people at Larachat ( https://larachat.slack.com/ ) helped me debug this problem.

The problem was in my crontab. I installed crontab to execute the artisan planner as follows:

*/1 * * * * php /path/to/artisan schedule:run

(Means every 1 minute of every hour every day.)

When should it be:

* * * * * php /path/to/artisan schedule:run

( .)

, cron -1- , .

+3

All Articles