Laravel - Task Scheduling - Background Tasks
By default, multiple tasks scheduled at the same time will execute sequentially based on the order they are defined in your schedule
method. If you have long-running tasks, this may cause subsequent tasks to start much later than anticipated. If you would like to run tasks in the background so that they may all run simultaneously, you may use the runInBackground
method:
$schedule->command('analytics:report')
->daily()
->runInBackground();
TherunInBackground
method may only be used when scheduling tasks via thecommand
andexec
methods.