Home  >  Article  >  PHP Framework  >  What happens when laravel scheduled tasks are not executed?

What happens when laravel scheduled tasks are not executed?

藏色散人
藏色散人forward
2021-02-07 15:01:253409browse

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!

What happens when laravel scheduled tasks are not executed?

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!

Statement:
This article is reproduced at:segmentfault.com. If there is any infringement, please contact admin@php.cn delete