AutoTask.php 535 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace app\admin\command;
  3. use think\console\Command;
  4. use think\console\Input;
  5. use think\console\Output;
  6. class AutoTask extends Command
  7. {
  8. public function configure()
  9. {
  10. $this
  11. ->setName('AutoTask')
  12. ->setDescription('自动下发定时指令');
  13. }
  14. public function execute(Input $input, Output $output)
  15. {
  16. //TODO STEP1 获取当前的时间
  17. //TODO 根据时间获取需要下发的指令
  18. //TODO 下发指令
  19. echo "自动执行启动了";
  20. }
  21. }