Laravel 5 - Task schedule withoutOverlapping not working

前端 未结 4 2043
予麋鹿
予麋鹿 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 05:55

    Delete ->everyMinute() when using ->withoutOverlapping() it will still run every minute but without overlapping.

    UPDATE

    Since Laravel v. 5.5+ you can specify on how many minutes must pass before the "without overlapping" lock expires.

    eg. ->withoutOverlapping(10) can be used to unlock the "overlapping" when 10 minutes will pass.

提交回复
热议问题