2023-02-19 01:40:12 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Console;
|
|
|
|
|
|
|
|
use Illuminate\Console\Scheduling\Schedule;
|
|
|
|
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
2023-08-30 14:28:40 +02:00
|
|
|
|
2024-01-12 15:56:24 +01:00
|
|
|
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
|
|
|
|
{
|
2024-01-12 15:56:24 +01:00
|
|
|
$schedule->job(new NotifyUsersManualModeOnJob)
|
2024-01-17 19:31:51 +01:00
|
|
|
->dailyAt('7:00')
|
|
|
|
->sentryMonitor();
|
2024-01-12 15:56:24 +01:00
|
|
|
$schedule->job(new RemoveOldIpAddressesFromLogsJob)
|
2024-01-17 19:31:51 +01:00
|
|
|
->dailyAt('0:30')
|
|
|
|
->sentryMonitor();
|
2024-01-12 15:56:24 +01:00
|
|
|
$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');
|
|
|
|
}
|
|
|
|
}
|