Kernel.php
2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
namespace App\Console;
use App\Console\Commands\ActivityStatusRecordCommand;
use App\Console\Commands\BrokerUserConfigCommand;
use App\Console\Commands\GroupOut;
use App\Console\Commands\HttpLogClearCommand;
use App\Console\Commands\NotifyMonitorCommand;
use App\Console\Commands\ProjectOut;
use App\Console\Commands\SyncBusinessDemoCommand;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
use Illuminate\Foundation\Inspiring;
use Illuminate\Support\Facades\Artisan;
/**
* @method comment(string $quote)
*/
class Kernel extends ConsoleKernel
{
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule): void
{
$schedule->command('telescope:prune --hours=336')->daily()->onOneServer();
$schedule->command('queue:prune-batches --hours=72')->daily()->onOneServer();
$schedule->command(SyncBusinessDemoCommand::class)->everyMinute()->onOneServer();
$schedule->command(HttpLogClearCommand::class)->withoutOverlapping(60)->lastDayOfMonth('03:00')->onOneServer();
$schedule->command(GroupOut::class)->everyOddHour()->onOneServer();
$schedule->command(ProjectOut::class)->everyOddHour()->onOneServer();
$schedule->command(ActivityStatusRecordCommand::class)->dailyAt('23:55')->onOneServer();
$schedule->command(NotifyMonitorCommand::class)->withoutOverlapping(5)->everyMinute()->onOneServer();
$schedule->command(BrokerUserConfigCommand::class, ['singer_num'])->dailyAt('01:00')->onOneServer();
$schedule->command(BrokerUserConfigCommand::class, ['level_message'])->withoutOverlapping(5)->everyMinute()->onOneServer();
}
/**
* Register the commands for the application.
*
* @return void
*/
protected function commands(): void
{
$this->load(__DIR__ . '/Commands');
Artisan::command('inspire', function () {
$this->comment(Inspiring::quote());
})->purpose('Display an inspiring quote');
}
}