Laravel Schedule WithoutOverlapping() Is Not Working With RunInBackground()
I'm trying to setup schedule for my commands in
/app/Console/Kernel.php and found out that
withoutOverlapping() doesnt work with
This works without overlaps:
$schedule ->command('test:update') ->withoutOverlapping();
This overlaps tasks:
$schedule ->command('test:update') ->withoutOverlapping() ->runInBackground();
In the first case, it was working without overlaps because command was running in the foreground and scheduler was busy processing this command thus didn't run new one until current command finished.
withoutOverlapping() did not impact anything here.
So the problem was that the mutex is not being created with
withoutOverlapping(). Laravel scheduler is using cache for mutex. Switching cache driver to redis helped fix this issue, now
withoutOverlapping() works as it should.
- → "failed to open stream" error when executing "migrate:make"
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS create a multi select Form field
- → October CMS - Conditionally Load a Different Page
- → How to disable assets combining on development in OctoberCMS
- → October CMS - Radio Button Ajax Click Twice in a Row Causes Content to disappear
- → OctoberCms component: How to display all ID(items) instead of sorting only one ID?
- → In OctoberCMS how do you find the hint path?
- → How to register middlewares in OctoberCMS plugin?