2020-12-01 17:02:10 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Console;
|
|
|
|
|
|
2021-10-29 12:53:46 +02:00
|
|
|
use App\Jobs\StartStatJobs;
|
2020-12-01 17:02:10 +01:00
|
|
|
use Illuminate\Console\Scheduling\Schedule;
|
|
|
|
|
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
|
|
|
|
|
|
|
|
|
class Kernel extends ConsoleKernel
|
|
|
|
|
{
|
2021-03-14 10:45:42 +01:00
|
|
|
|
2020-12-01 17:02:10 +01:00
|
|
|
/**
|
|
|
|
|
* The Artisan commands provided by your application.
|
|
|
|
|
*
|
|
|
|
|
* @var array
|
|
|
|
|
*/
|
2021-07-22 15:14:07 +02:00
|
|
|
protected $commands = [];
|
2020-12-01 17:02:10 +01:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Define the application's command schedule.
|
|
|
|
|
*
|
|
|
|
|
* @param \Illuminate\Console\Scheduling\Schedule $schedule
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
protected function schedule(Schedule $schedule)
|
|
|
|
|
{
|
2021-10-29 12:53:46 +02:00
|
|
|
// stats job on night
|
|
|
|
|
$schedule->job(StartStatJobs::class)->dailyAt('03:30');
|
2020-12-01 17:02:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Register the commands for the application.
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
protected function commands()
|
|
|
|
|
{
|
2021-02-28 12:04:49 +01:00
|
|
|
$this->load(__DIR__ . '/Commands');
|
2020-12-01 17:02:10 +01:00
|
|
|
|
|
|
|
|
require base_path('routes/console.php');
|
|
|
|
|
}
|
|
|
|
|
}
|