allerta-vvf/backend/app/Console/Kernel.php

44 lines
1.1 KiB
PHP
Raw Normal View History

2023-02-19 01:40:12 +01:00
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
use App\Jobs\NotifyUsersManualModeOnJob;
use App\Jobs\RemoveOldIpAddressesFromLogsJob;
use App\Jobs\ResetAvailabilityMinutesJob;
2024-01-10 18:41:52 +01:00
use App\Jobs\UpdateAvailabilityWithSchedulesJob;
2023-02-19 01:40:12 +01:00
class Kernel extends ConsoleKernel
{
/**
* Define the application's command schedule.
*/
protected function schedule(Schedule $schedule): void
{
$schedule->job(new NotifyUsersManualModeOnJob)
2024-01-17 19:31:51 +01:00
->dailyAt('7:00')
->sentryMonitor();
$schedule->job(new RemoveOldIpAddressesFromLogsJob)
2024-01-17 19:31:51 +01:00
->dailyAt('0:30')
->sentryMonitor();
$schedule->job(new ResetAvailabilityMinutesJob)
2024-01-17 19:31:51 +01:00
->monthlyOn(1, '0:00')
->sentryMonitor();
2024-01-10 18:41:52 +01:00
$schedule->job(new UpdateAvailabilityWithSchedulesJob)
2024-01-17 19:31:51 +01:00
->everyThirtyMinutes()
->sentryMonitor();
2023-02-19 01:40:12 +01:00
}
/**
* Register the commands for the application.
*/
protected function commands(): void
{
$this->load(__DIR__.'/Commands');
require base_path('routes/console.php');
}
}