23eb9dcbda
* 384 Laravel 6 changes * Library versions * Update package versions * Add keyType to models * Remove unused dependencies * StyleCI fixes * Fix models for test * Fix tests output and update test runner * Unused imports * Update exceptions handler * Fix login page
45 lines
1.2 KiB
PHP
Executable File
45 lines
1.2 KiB
PHP
Executable File
<?php
|
|
|
|
namespace App\Console;
|
|
|
|
use App\Console\Cron\Hourly;
|
|
use App\Console\Cron\Monthly;
|
|
use App\Console\Cron\Nightly;
|
|
use App\Console\Cron\Weekly;
|
|
use Illuminate\Console\Scheduling\Schedule;
|
|
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
|
|
|
class Kernel extends ConsoleKernel
|
|
{
|
|
/**
|
|
* Define the application's command schedule.
|
|
*
|
|
* @param \Illuminate\Console\Scheduling\Schedule $schedule
|
|
*
|
|
* @return void
|
|
*/
|
|
protected function schedule(Schedule $schedule): void
|
|
{
|
|
$schedule->command(Nightly::class)->dailyAt('01:00');
|
|
$schedule->command(Weekly::class)->weeklyOn(0);
|
|
$schedule->command(Monthly::class)->monthlyOn(1);
|
|
$schedule->command(Hourly::class)->hourly();
|
|
|
|
// When spatie-backups runs
|
|
$schedule->command('backup:clean')->daily()->at('01:00');
|
|
$schedule->command('backup:run')->daily()->at('02:00');
|
|
}
|
|
|
|
/**
|
|
* Register the Closure based commands for the application.
|
|
*
|
|
* @return void
|
|
*/
|
|
protected function commands(): void
|
|
{
|
|
require app_path('Http/Routes/console.php');
|
|
$this->load(__DIR__.'/Commands');
|
|
$this->load(__DIR__.'/Cron');
|
|
}
|
|
}
|