0
0

QualityTask.php 593 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace app\cron;
  3. use yunwuxin\cron\Task;
  4. class QualityTask extends Task
  5. {
  6. public function configure()
  7. {
  8. $this->everyMinute(); //每分钟执行一次
  9. }
  10. /**
  11. * 执行任务
  12. * @return mixed
  13. */
  14. protected function execute()
  15. {
  16. try{
  17. (new \app\common\model\QualityTask())->addPatrolTask();
  18. set_time_limit(0);
  19. ini_set("memory_limit","1024M");
  20. (new \app\common\model\QualityTask())->timerAction();
  21. }catch (\Exception $e){
  22. trace($e->getMessage());
  23. }
  24. }
  25. }