Laravel:schedule:finish 是做什么的?

Laravel: what does schedule:finish do?

偶然发现Laravel 6schedule:run有个弟弟,叫schedule:finish

但是使用 artisan list 没有记录。

这个控制台命令有什么作用?

schedule:finish 用于设置进程完成执行后的动作, 如果您有两个或三个级别的进程,您希望它们一个接一个地执行并相互依赖,您可以使用 schedule:finish 命令

此隐藏命令已添加到 Laravel 5.4 以处理给定命令的后回调。

查看 Taylor Otwellthis PR 的解释:

This PR adds improvements to the scheduler. Previously, when ->runInBackground() was used "after" hooks were not run, meaning output was not e-mailed to the developer (when using emailOutputTo.)

This change provides a new, hidden schedule:finish command that is used to fire the after callbacks for a given command by its mutex name. This command will not show in the Artisan console command list since it uses the hidden command feature which is new in Symfony 3.2.