Kernel.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. namespace App\Console;
  3. use Illuminate\Console\Scheduling\Schedule;
  4. use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
  5. class Kernel extends ConsoleKernel
  6. {
  7. /**
  8. * Define the application's command schedule.
  9. *
  10. * @param \Illuminate\Console\Scheduling\Schedule $schedule
  11. * @return void
  12. */
  13. protected function schedule(Schedule $schedule)
  14. {
  15. $schedule->command('Callback:JuliangAccountRateConfigRefresh')->everyMinute();
  16. /**
  17. * 投放渠道日结算
  18. */
  19. $schedule->command('Jiesuan:CompanyChargeDayJiesuan', [
  20. '--date' => date('Y-m-d', strtotime('yesterday'))
  21. ])->dailyAt('01:00');
  22. /**
  23. * 充值统计----------------------
  24. */
  25. $schedule->command('Statistic:CompanyDayCharge')->dailyAt('02:00');
  26. $schedule->command('Statistic:CompanyMonthCharge')->monthlyOn(1, '04:00');
  27. $schedule->command('Statistic:PromotionDayCharge')->dailyAt('01:00');
  28. $schedule->command('Statistic:OptimizerMonthCharge')->monthlyOn(1,'03:00');
  29. // 新增用户统计
  30. $schedule->command('Statistic:OptimizerDayUser')->dailyAt('05:00');
  31. }
  32. /**
  33. * Register the commands for the application.
  34. *
  35. * @return void
  36. */
  37. protected function commands()
  38. {
  39. $this->load(__DIR__.'/Commands');
  40. require base_path('routes/console.php');
  41. }
  42. }