GenerateProject.php 603 字节
<?php

namespace addons\inspection\library;

use addons\ygame\service\Order;
use think\console\Command;
use think\console\Input;
use think\console\Output;
use think\Hook;

class GenerateProject extends Command
{

    protected function configure()
    {
        $this
            ->setName('generateProject')
            ->setDescription('自动化生成巡检任务');
    }

    protected function execute(Input $input, Output $output)
    {
        while (true){
            Hook::exec('addons\\inspection\\library\\Project','init',$params);
            sleep(60*60);   //1小时
        }

    }

}