omar_8

task schedule (withoutOverlapping) not working as expected

Posted 2 years ago by omar_8

i have multi task schedule each of them need long time to be finished so i'have used (withoutOverlapping) method but it's blocking the full task schedule not just the first one for example:

//need about 20 minutes

 $schedule->command('some command')->withoutOverlapping();

//need about 15 minutes

  $schedule->command('some other command')->withoutOverlapping();

the first one is blocking the second until it's done execution,

is there any way to block the current task only so the next cron can skip the first task and start the next task.

i'know the first cron will continue the execution after the first one is done but the data will take soo much time to be processed since i'have about 6 task each of them needs 20 to 30 minute of execution time.

any idea!!

Please sign in or create an account to participate in this conversation.