ldc-legaulois/app/Console/Kernel.php

38 lines
941 B
PHP
Raw Normal View History

2020-07-23 10:29:36 +02:00
<?php
namespace App\Console;
2024-07-17 16:29:49 +02:00
use App\Jobs\DeleteOldMessages;
use App\Jobs\FetchDigitalRecruiterOffers;
2024-09-06 14:54:26 +02:00
use App\Jobs\FetchMesBr;
2020-07-23 10:29:36 +02:00
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
2024-01-10 14:49:46 +01:00
* Define the application's command schedule.
2020-07-23 10:29:36 +02:00
*
2024-01-10 14:49:46 +01:00
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
2020-07-23 10:29:36 +02:00
*/
protected function schedule(Schedule $schedule): void
2024-01-10 14:49:46 +01:00
{
$schedule->job(FetchDigitalRecruiterOffers::class)->everyFourHours(15);
2024-07-17 16:29:49 +02:00
$schedule->job(DeleteOldMessages::class)->dailyAt('14:15');
2024-09-06 14:54:26 +02:00
$schedule->job(FetchMesBr::class)->daily();
2024-01-10 14:49:46 +01:00
}
2020-07-23 10:29:36 +02:00
/**
2024-01-10 14:49:46 +01:00
* Register the commands for the application.
2020-07-23 10:29:36 +02:00
*
* @return void
*/
protected function commands(): void
2020-07-23 10:29:36 +02:00
{
2024-01-10 14:49:46 +01:00
$this->load(__DIR__ . '/Commands');
2024-01-10 14:49:46 +01:00
require base_path('routes/console.php');
2020-07-23 10:29:36 +02:00
}
}