55 lines
1.7 KiB
PHP
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');
|
|
}
|
|
}
|