The following column Laravel Tutorial will introduce to you the problem of laravel scheduling tasks not being executed. I hope it will be helpful to friends in need!
Laravel scheduling task is not executed
The scheduling task command is as follows:
$schedule->command('emails:send')->withoutOverlapping();
Instructions:
withoutOverlapping
The function of this command is that when a process has not finished running, a new process will not be started. The mechanism is that when bright is turned on, a file will be added to the storage/framework/cache
directory of the project. If the process is stuck or is not completed, the file will fall into an infinite loop and continue to execute the After the process is executed, the corresponding cache file will be deleted and the next process will start. .
A simple understanding is that adding withoutOverlapping
will cause blocking, and only completed tasks will continue the following process!
The above is the detailed content of What happens when laravel scheduled tasks are not executed?. For more information, please follow other related articles on the PHP Chinese website!