SendBonusRewards.php 948 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace app\api\command;
  3. use think\console\Command;
  4. use think\console\Input;
  5. use think\console\Output;
  6. use app\common\logic\BonusRewardsLogic;
  7. use app\common\model\TimedTaskLogModel;
  8. use think\Model;
  9. class SendBonusRewards extends Command
  10. {
  11. protected function configure()
  12. {
  13. $this->setName('SendBonusRewards')->setDescription('Here is the remark ');
  14. }
  15. protected function execute(Input $input, Output $output)
  16. {
  17. /* 永不超时 */
  18. // ini_set('max_execution_time', 0);
  19. // 记录开始运行的时间
  20. $GLOBALS['_beginTime'] = microtime(TRUE);
  21. $output->writeln('定时任务开始执行:' . date('Y-m-d H:i:s', time()));
  22. /*** 发放团队算力奖励 ***/
  23. $output->writeln("开始发放团队算力奖励:");
  24. $model = new BonusRewardsLogic();
  25. $model->allowanceRewards();
  26. $output->info("SendTeamRewards ok!");
  27. }
  28. }