| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- namespace app\api\command;
- use app\common\logic\ScanLogic;
- use think\console\Command;
- use think\console\Input;
- use think\console\Output;
- use app\common\logic\TeamRewards;
- use app\common\model\TimedTaskLogModel;
- use think\Model;
- class Test extends Command
- {
- protected function configure()
- {
- $this->setName('test')->setDescription('Here is the remark ');
- }
- protected function execute(Input $input, Output $output)
- {
- /* 永不超时 */
- // ini_set('max_execution_time', 0);
- // 记录开始运行的时间
- $GLOBALS['_beginTime'] = microtime(TRUE);
- $output->writeln('定时任务开始执行:' . date('Y-m-d H:i:s', time()));
- /*** 发放分红收益 ***/
- $begin_usdt = microtime(TRUE);
- $output->writeln("开始发放加权分红:");
- (new \app\api\controller\Test())->reset_team();
- $time_total = round(microtime(true) - $GLOBALS['_beginTime'], 4);//计算耗时
- $output->writeln('定时任务执行结束,总耗时' . date('Y-m-d H:i:s', time()) . '; 耗时:' . $time_total . '秒');
- }
- }
|