ldc-bogt/app/Console/Kernel.php

56 lines
1.7 KiB
PHP
Raw Permalink Normal View History

2019-12-04 17:30:46 +01:00
<?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;
2019-12-04 17:30:46 +01:00
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
*/
2022-03-08 11:49:18 +01:00
protected $commands = [];
2019-12-04 17:30:46 +01:00
/**
* Define the application's command schedule.
*
2022-03-08 09:42:26 +01:00
* @param \Illuminate\Console\Scheduling\Schedule $schedule
2019-12-04 17:30:46 +01:00
* @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');
2019-12-04 17:30:46 +01:00
}
/**
* Register the commands for the application.
*
* @return void
*/
protected function commands()
{
2022-03-08 09:42:26 +01:00
$this->load(__DIR__ . '/Commands');
2019-12-04 17:30:46 +01:00
require base_path('routes/console.php');
}
}