Completed
Push — master ( 515139...fcdc06 )
by Dan Michael O.
19:00
created

Kernel::commands()   A

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
        // Bring subject heading usage counts up-to-date
30
        $schedule->command('colligator:reindex')
31
                 ->weekly()->sundays()->at('04:00');
32
33
        // Check new documents for xisbn
34
        $schedule->command('colligator:harvest-xisbn')
35
                 ->weekly()->saturdays()->at('04:00');
36
    }
37
38
    /**
39
     * Register the commands for the application.
40
     *
41
     * @return void
42
     */
43
    protected function commands()
44
    {
45
        $this->load(__DIR__.'/Commands');
46
47
        require base_path('routes/console.php');
48
    }
49
}
50