Sunday, May 21, 2017

Laravel task scheduling commands not working

I'm running laravel 5.1 and I'm having some issues with the laravel Task Scheduling. The problem is that some of the commands are running, but others aren't. I have no explanation at all for this...

I've got 2 commands as defined like this:

$schedule->command('some:command')
    ->cron('00 00 * * *');

$schedule->command('some:other:command')
    ->cron('50 00 * * 7');

Both of my commands are listed in the protected $commands array.

The some:command command runs fine every day but the some:other:command isn't running at all. When I call the command itself with php artisan everything works fine. It's the same issue when I change the ->cron() function to the ->dailyAt('00:00'); function.

This problem only occurs on my staging environment, on production everything runs fine. Both environments are 100% the same...



via user3601546

Advertisement