I am trying to configure laravel task schedular , I am priting numbers from 0 to infinity to just test why withoutoverlapping() isn't working.
My code :
protected function schedule(Schedule $schedule)
{
$schedule->call(function (Request $request)
{
$i=0;
while(1)
{
echo $i."-";
sleep(3);
$i++;
}
})->everyMinute()->name('mailfetch')->withoutOverlapping();
}
If my schedular is running and I am trying to run another schedular then that should not execute, but in my case both schedulars start running and start priting data.
Output:
Everything seems to be correct but dont' know why is that happening.