Kernel.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. protected $commands = [
  8. \App\Console\Commands\StartFiveSecondTask::class,
  9. ];
  10. /**
  11. * Define the application's command schedule.
  12. *
  13. * @param \Illuminate\Console\Scheduling\Schedule $schedule
  14. * @return void
  15. */
  16. protected function schedule(Schedule $schedule)
  17. {
  18. // PC28 任务由 five_task 启动,并在队列中自行安排下一轮。
  19. // 不在 scheduler 中重复投递,避免启动多条循环。
  20. $schedule->command('sport')->dailyAt('23:59:00');
  21. $schedule->command('third-game:sync-orders')
  22. ->everyMinute()
  23. ->withoutOverlapping(5);
  24. $schedule->command('agent:settle')
  25. ->dailyAt('04:10')
  26. ->withoutOverlapping(180);
  27. }
  28. /**
  29. * Register the commands for the application.
  30. *
  31. * @return void
  32. */
  33. protected function commands()
  34. {
  35. $this->load(__DIR__.'/Commands');
  36. require base_path('routes/console.php');
  37. }
  38. }