在Laravel Artisan Scheduler中链接命令?
- 论坛
- 在Laravel Artisan Scheduler中链接命令?
10 浏览
在Laravel Artisan Scheduler中链接命令?
假设我有三个命令需要调度:'commandA'、'commandB'和'commandC',但我不想在'commandA'完成之前运行'commandB',也不想在'commandB'完成之前运行'commandC'。我知道可以将它们每个都调度为每五分钟运行一次:
$schedule->command('commandA')->everyFiveMinutes(); $schedule->command('commandB')->everyFiveMinutes(); $schedule->command('commandC')->everyFiveMinutes();
但是否可以将它们依次链接起来?