<?php

use App\Console\Commands\GeneratePayrollCommand;
use App\Jobs\CheckAttendancePenaltiesJob;
use App\Jobs\CleanupOrphanedMediaJob;
use Illuminate\Support\Facades\Schedule;

Schedule::command(GeneratePayrollCommand::class)
    ->daily()
    ->when(fn () => now()->day === 5)
    ->at('00:00');
Schedule::job(new CheckAttendancePenaltiesJob)->dailyAt('12:00');
Schedule::job(new CleanupOrphanedMediaJob)->monthlyOn(1, '01:00');
