Laravel Artisan Scheduler中的链命令? [英] Chain commands in Laravel Artisan Scheduler?
本文介绍了Laravel Artisan Scheduler中的链命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
假设我要调度三个命令: 'commandA','commandB'和'commandC'
Suppose I have three commands I want to schedule: 'commandA', 'commandB', and 'commandC'
但是我不想在'commandA'完成之前运行'commandB',并且我不想在'commandB'完成之前运行'commandC'.
But I don't want to run 'commandB' until 'commandA' is complete and I don't want to run 'commandC' until 'commandB' is complete.
我知道我可以安排每五分钟运行一次
I know I can schedule each to run every five minutes:
$schedule->command('commandA')->everyFiveMinutes();
$schedule->command('commandB')->everyFiveMinutes();
$schedule->command('commandC')->everyFiveMinutes();
但是可以将它们一个接一个地链接吗?
But is it possible to chain them one after the other?
推荐答案
使用 查看全文