Kernel   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 26
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A schedule() 0 9 1
1
<?php
2
3
namespace App\Console;
4
5
use App\Console\Commands\DeleteExpiredTokensCommand;
6
use App\Console\Commands\TaskNotificationsCommand;
7
use Illuminate\Console\Scheduling\Schedule;
8
use Laravel\Lumen\Console\Kernel as ConsoleKernel;
9
10
/**
11
 * Class Kernel
12
 *
13
 * @package App\Console
14
 */
15
class Kernel extends ConsoleKernel
16
{
17
    /**
18
     * The Artisan commands provided by your application.
19
     *
20
     * @var array
21
     */
22
    protected $commands = [
23
        DeleteExpiredTokensCommand::class,
24
        TaskNotificationsCommand::class
25
    ];
26
27
    /**
28
     * Define the application's command schedule.
29
     *
30
     * @param  Schedule  $schedule
31
     */
32
    protected function schedule(Schedule $schedule)
33
    {
34
        $schedule->command('delete:expiredTokens')
35
                 ->daily()->at('4:00')
36
                 ->appendOutputTo(storage_path('logs/cron_delete_expired_tokens.log'));
37
38
        $schedule->command('send:taskNotifications')
39
                 ->daily()->at('8:00')
40
                 ->appendOutputTo(storage_path('logs/cron_send_task_notifications.log'));
41
    }
42
}
43