Laravel 5 - Task schedule withoutOverlapping not working

前端 未结 4 2146
予麋鹿
予麋鹿 2021-02-20 05:33

I try to run schedule on Laravel 5. Its work fine when I run this:

$schedule->call(function() {
   // do something here..
})->everyMinute();
4条回答
  •  别那么骄傲
    2021-02-20 06:01

    withoutOverlapping method creates a mutex file when a command is executed and deletes the mutex file when it execution is finished.

    Scheduler check if mutex file is present for any command it doesn't allow to execute it again.

    In your case the mutex file is not deleted and it prevents the command to run again.

    You can clear the laravel cache to make it work again using php artisan cache:clear

提交回复
热议问题