jeudi 8 décembre 2016

Laravel non-overlapping scheduled job not executing

I have a Laravel Scheduled job which is defined in Kernel.php like so

$schedule->call('\App\Http\Controllers\ScheduleController@processQueuedMessages')
    ->everyFiveMinutes()
    ->name('process_queued_messages')
    ->withoutOverlapping();

During development, my job threw an exception due to a syntax error. I corrected the error and tried executing it again; but for some reason it won't.

I tried artisan down and then artisan up. I also tried restarting the server instance. But nothing would help. The job just didn't get executed (there was no exception either).

I realize that the problem is due to ->withoutOverlapping(). Somehow, Laravel scheduler is thinking that the job is already running and hence is not executing it again.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire