| 12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- namespace app\api\command;
- use think\console\Command;
- use think\console\Input;
- use think\console\Output;
- use app\common\logic\BonusRewards;
- use app\common\model\TimedTaskLogModel;
- use think\Model;
- class SendBonusRewards extends Command
- {
- protected function configure()
- {
- $this->setName('SendBonusRewards')->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()));
- /*** 发放团队算力奖励 ***/
- $output->writeln("开始发放团队算力奖励:");
- $log_id = (new BonusRewards())->powerRewards();
- $output->info("SendTeamRewards ok!");
- }
- }
|