| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- namespace App\Console;
- use Illuminate\Console\Scheduling\Schedule;
- use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
- class Kernel extends ConsoleKernel
- {
- protected $commands = [
- \App\Console\Commands\StartFiveSecondTask::class,
- ];
- /**
- * Define the application's command schedule.
- *
- * @param \Illuminate\Console\Scheduling\Schedule $schedule
- * @return void
- */
- protected function schedule(Schedule $schedule)
- {
- // PC28 任务由 five_task 启动,并在队列中自行安排下一轮。
- // 不在 scheduler 中重复投递,避免启动多条循环。
- $schedule->command('sport')->dailyAt('23:59:00');
- $schedule->command('third-game:sync-orders')
- ->everyMinute()
- ->withoutOverlapping(5);
- $schedule->command('agent:settle')
- ->dailyAt('04:10')
- ->withoutOverlapping(180);
- }
- /**
- * Register the commands for the application.
- *
- * @return void
- */
- protected function commands()
- {
- $this->load(__DIR__.'/Commands');
- require base_path('routes/console.php');
- }
- }
|