Kernel.php 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php
  2. namespace App\Console;
  3. use App\Console\Commands\DbQueue;
  4. use App\Console\Commands\OnlineReport;
  5. use App\Console\Commands\DecStock;
  6. use App\Console\Commands\ExemptReview;
  7. use App\Console\Commands\Extension;
  8. use App\Console\Commands\PayOrder;
  9. use App\Console\Commands\RecordPlatformData;
  10. use App\Console\Commands\RecordServerGameCount;
  11. use App\Console\Commands\RecordServerGameCountYesterday;
  12. use App\Console\Commands\RecordThreeGameYesterday;
  13. use App\Console\Commands\RecordUserScoreChangeStatistics;
  14. use Illuminate\Console\Scheduling\Schedule;
  15. use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
  16. class Kernel extends ConsoleKernel
  17. {
  18. /**
  19. * The Artisan commands provided by your application.
  20. *
  21. * @var array
  22. */
  23. protected $commands = [
  24. ExemptReview::class,
  25. PayOrder::class,
  26. Extension::class,
  27. RecordPlatformData::class,
  28. RecordServerGameCount::class,
  29. RecordServerGameCountYesterday::class,
  30. RecordUserScoreChangeStatistics::class,
  31. DecStock::class,
  32. OnlineReport::class,
  33. DbQueue::class,
  34. RecordThreeGameYesterday::class
  35. ];
  36. /**
  37. * Define the application's command schedule.
  38. *
  39. * @param \Illuminate\Console\Scheduling\Schedule $schedule
  40. * @return void
  41. */
  42. protected function schedule(Schedule $schedule)
  43. {
  44. // $schedule->command('db_queue')->everyMinute()->description('批量处理redis队列任务');
  45. $schedule->command('exempt_review')->everyMinute()->description('免审提现');
  46. $schedule->command('record_server_game_count')->cron('*/15 * * * * ')->description('按天统计游戏人数');
  47. $schedule->command('online_max')->cron('*/8 * * * * ')->description('最高在线人数统计');
  48. $schedule->command('record_server_game_count_yesterday')->cron('05 0 * * * ')->description('按天统计游戏人数--今日执行昨日');
  49. $schedule->command('RecordPlatformData')->cron('10 0 * * * ')->description('数据统计');
  50. $schedule->command('RecordUserScoreChangeStatistics')->cron('03 0 * * * ')->description('用户金额变化明细按天按用户汇总');
  51. $schedule->command('online_report')->everyMinute()->description('每分钟统计曲线');
  52. // $schedule->command('record_three_game_yesterday')->cron('05 0 * * * ')->description('按天统计游戏人数--今日执行昨日');
  53. }
  54. /**
  55. * Register the commands for the application.
  56. *
  57. * @return void
  58. */
  59. protected function commands()
  60. {
  61. $this->load(__DIR__.'/Commands');
  62. // require base_path('routes/console.php');
  63. }
  64. }