2023-05-17 09:08:43 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Console;
|
|
|
|
|
|
2026-04-23 16:57:59 +02:00
|
|
|
use App\Jobs\CleanOldActivities;
|
2025-07-03 10:12:27 +02:00
|
|
|
use App\Jobs\UpdatePlanificatedStatus;
|
2023-05-17 09:08:43 +02:00
|
|
|
use Illuminate\Console\Scheduling\Schedule;
|
|
|
|
|
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
|
|
|
|
|
|
|
|
|
class Kernel extends ConsoleKernel
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Define the application's command schedule.
|
|
|
|
|
*
|
|
|
|
|
* @param \Illuminate\Console\Scheduling\Schedule $schedule
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
2025-07-03 10:12:27 +02:00
|
|
|
protected function schedule(Schedule $schedule): void
|
2023-05-17 09:08:43 +02:00
|
|
|
{
|
2026-04-23 16:57:59 +02:00
|
|
|
$schedule->job(CleanOldActivities::class)->daily();
|
2025-07-03 10:12:27 +02:00
|
|
|
$schedule->job(UpdatePlanificatedStatus::class)->everyFiveMinutes();
|
2023-05-17 09:08:43 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Register the commands for the application.
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
2025-07-03 10:12:27 +02:00
|
|
|
protected function commands(): void
|
2023-05-17 09:08:43 +02:00
|
|
|
{
|
|
|
|
|
$this->load(__DIR__ . '/Commands');
|
|
|
|
|
|
|
|
|
|
require base_path('routes/console.php');
|
|
|
|
|
}
|
|
|
|
|
}
|