Total Complexity | 6 |
Total Lines | 53 |
Duplicated Lines | 0 % |
Changes | 6 | ||
Bugs | 0 | Features | 5 |
1 | <?php |
||
8 | class Kernel extends ConsoleKernel |
||
9 | { |
||
10 | /** |
||
11 | * The Artisan commands provided by your application. |
||
12 | * |
||
13 | * @var array |
||
14 | */ |
||
15 | protected $commands=[ |
||
16 | // |
||
17 | ]; |
||
18 | |||
19 | /** |
||
20 | * Define the application's command schedule. |
||
21 | * |
||
22 | * @param \Illuminate\Console\Scheduling\Schedule $schedule |
||
23 | * @return void |
||
24 | */ |
||
25 | protected function schedule(Schedule $schedule) |
||
26 | { |
||
27 | |||
28 | $schedule->command('scheduling:updateSiteRank')->dailyAt('01:00')->description("Update Rank"); |
||
29 | |||
30 | $schedule->command('scheduling:updateSiteMap')->dailyAt('02:00')->description("Update SiteMap"); |
||
31 | |||
32 | $schedule->command('scheduling:updateTrendingGroups')->dailyAt('03:00')->description("Update Trending Groups"); |
||
33 | |||
34 | $schedule->command('scheduling:updateGroupElo')->dailyAt('04:00')->description("Update Group Elo"); |
||
35 | |||
36 | $schedule->command('scheduling:syncRankClarification')->everyMinute()->description("Sync Remote Contest Rank and Clarification"); |
||
37 | |||
38 | $schedule->command('scheduling:syncContestProblem')->everyMinute()->description("Sync Remote Contest Problem"); |
||
39 | |||
40 | $schedule->command('scheduling:updateJudgeServerStatus')->everyMinute()->description("Update Judge Server Status"); |
||
41 | |||
42 | if (!config("app.debug") && config("app.backup")) { |
||
43 | $schedule->command('backup:run')->weekly()->description("BackUp Site"); |
||
44 | } |
||
45 | |||
46 | if (!config("app.debug") && config("app.backup")) { |
||
47 | $schedule->command('backup:run --only-db')->dailyAt('00:30')->description("BackUp DataBase"); |
||
48 | } |
||
49 | } |
||
50 | |||
51 | /** |
||
52 | * Register the commands for the application. |
||
53 | * |
||
54 | * @return void |
||
55 | */ |
||
56 | protected function commands() |
||
61 | } |
||
62 | } |
||
63 |