12345678910111213141516171819202122232425 |
- <?php
- declare (strict_types = 1);
- namespace app\command;
- use schedule\console\Command;
- use think\console\Input;
- use think\console\Output;
- class Schedule extends Command
- {
- protected function configure()
- {
- // 指令配置
- $this->setName('schedule:run')
- ->setDescription('the schedule:run command');
- }
- protected function execute(Input $input, Output $output)
- {
- // 每5分钟执行一次test指令
- $this->command('test')->everyFiveMinutes();
- parent::execute($input,$output);
- }
- }
|