ldc-bogt/app/Console/Kernel.php
Jérémy Munsch 8ee2127b74
Solves #1
clean up web-status-checker-laravel implementation
add xml:clean_olds to kernel
2022-10-20 16:23:14 +02:00

55 lines
1.7 KiB
PHP

<?php
namespace App\Console;
use App\Jobs\Arcadia\XmlFluxEggJob;
use App\Jobs\Arcadia\XmlFluxPoultryJob;
use App\Jobs\CafelBeaVolJob;
use App\Jobs\CafelEggBreederJob;
use App\Jobs\CafelFoodJob;
use App\Jobs\CafelMepEggJob;
use App\Jobs\CafelPoultryBreederJob;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [];
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
// * Jobs cafel sur queue cafel
$schedule->job(CafelFoodJob::class, 'cafel')->onOneServer()->everyThreeHours();
$schedule->job(CafelBeaVolJob::class, 'cafel')->onOneServer()->everyThreeHours();
$schedule->job(CafelMepEggJob::class, 'cafel')->onOneServer()->everyThreeHours();
$schedule->job(CafelEggBreederJob::class, 'cafel')->onOneServer()->everyThreeHours();
$schedule->job(CafelPoultryBreederJob::class, 'cafel')->onOneServer()->everyThreeHours();
$schedule->job(XmlFluxEggJob::class, 'tracea')->onOneServer()->dailyAt('02:00');
$schedule->job(XmlFluxPoultryJob::class, 'tracea')->onOneServer()->dailyAt('22:00');
$schedule->command('xml:clean_olds')->onOneServer()->dailyAt('06:00');
}
/**
* Register the commands for the application.
*
* @return void
*/
protected function commands()
{
$this->load(__DIR__ . '/Commands');
require base_path('routes/console.php');
}
}