0
0

GreenTimeout.php 522 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace app\cron;
  3. use app\common\model\GreenTask;
  4. use yunwuxin\cron\Task;
  5. //处理已超时绿化养护任务,并从任务栏删除
  6. class GreenTimeout extends Task
  7. {
  8. public function configure()
  9. {
  10. $this->everyMinute(); //每分钟执行一次
  11. }
  12. /**
  13. * 执行任务
  14. * @return mixed
  15. */
  16. protected function execute()
  17. {
  18. try{
  19. (new GreenTask())->timer_action();
  20. }catch (\Exception $e){
  21. trace($e->getMessage());
  22. }
  23. }
  24. }