ldc-bogt/app/Console/Kernel.php
2022-12-22 17:00:08 +01: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()->dailyAt('22h30');
$schedule->job(CafelBeaVolJob::class, 'cafel')->onOneServer()->dailyAt('22h45');
$schedule->job(CafelMepEggJob::class, 'cafel')->onOneServer()->dailyAt('23h00');
$schedule->job(CafelEggBreederJob::class, 'cafel')->onOneServer()->dailyAt('23h15');
$schedule->job(CafelPoultryBreederJob::class, 'cafel')->onOneServer()->dailyAt('23h30');
$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');
}
}