Kernel::commands()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Colligator\Console;
4
5
use Illuminate\Console\Scheduling\Schedule;
6
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
7
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
     */
24
    protected function schedule(Schedule $schedule)
25
    {
26
        $schedule->command('colligator:harvest-oaipmh samling42 --daily')
27
                 ->dailyAt('02:00');
28
29
        $schedule->command('colligator:harvest-oaipmh s-litt --daily')
30
                 ->dailyAt('03:00');
31
32
        // Bring subject heading usage counts up-to-date
33
        $schedule->command('colligator:reindex')
34
                 ->weekly()->sundays()->at('04:00');
35
36
        // Check new documents for xisbn
37
        $schedule->command('colligator:harvest-xisbn')
38
                 ->weekly()->saturdays()->at('04:00');
39
    }
40
41
    /**
42
     * Register the commands for the application.
43
     *
44
     * @return void
45
     */
46
    protected function commands()
47
    {
48
        $this->load(__DIR__.'/Commands');
49
50
        require base_path('routes/console.php');
51
    }
52
}
53