Kernel::schedule()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 7
ccs 4
cts 4
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
3
namespace plunner\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
        \plunner\Console\Commands\Inspire::class,
17
        \plunner\Console\Commands\SyncCaldav\SyncCaldav::class,
18
        \plunner\Console\Commands\Optimise\OptimiseCommand::class,
19
        \plunner\Console\Commands\MeetingsList::class,
20
    ];
21
22
    /**
23
     * Define the application's command schedule.
24
     *
25
     * @param  \Illuminate\Console\Scheduling\Schedule $schedule
26
     * @return void
27
     */
28 354
    protected function schedule(Schedule $schedule)
29
    {
30
        //$schedule->command('inspire')
31
        //         ->hourly();
32 354
        $schedule->command('sync:caldav --background')->withoutOverlapping()->everyTenMinutes();
33 354
        $schedule->command('optimise:meetings --background')->withoutOverlapping()->weekly()->sundays()->at('00:00');
34 354
    }
35
}
36