Home > Mobile >  Why did Artisan Schedule ignore "withoutOverlapping"?
Why did Artisan Schedule ignore "withoutOverlapping"?

Time:05-13

In my Laravel Kernel I have the following schedule function:

   $schedule->command('import:currencyrate')->everyMinute()->withoutOverlapping(1)->emailOutputOnFailure('[email protected]');
    $schedule->command('import:token_data')->everyFiveMinutes()->withoutOverlapping(1)->emailOutputOnFailure('[email protected]');
    $schedule->command('import:nft_data')->everyTenMinutes()->withoutOverlapping(1);

This usually works without any issues for the last year. But for the last few days, my server crashes 1-2 times a day, due to tasks that don't complete & overlap:

enter image description here

How is this possible? I use withoutOverlapping, shouldn't that stop the same task to run multiple times?

CodePudding user response:

you have written ->withoutOverlapping(1) that means after 1 min of lock time your task will run again. Click here to see the laravel documentation. Try ->withoutOverlapping() and check.

  • Related