GameTotal.php 602 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace app\process\dataReport;
  3. use app\v1\logic\tool\dataReport\GameTotalMonthDataReportLogic;
  4. use Workerman\Crontab\Crontab;
  5. /**
  6. * 统计总表
  7. */
  8. class GameTotal
  9. {
  10. public function onWorkerStart(): void
  11. {
  12. // 每2小时执行一次
  13. new Crontab('0 */2 * * *', function() {
  14. (new GameTotalMonthDataReportLogic())->run();
  15. });
  16. }
  17. // {"date":["2025-06-25","2025-06-26"]}
  18. public function run($args)
  19. {
  20. $params = $args ? json_decode($args, true) : [];
  21. return (new GameTotalMonthDataReportLogic())->run($params);
  22. }
  23. }