19 lines
616 B
PHP
19 lines
616 B
PHP
<?php
|
|
|
|
use App\Console\Commands\GeneratePayrollCommand;
|
|
use App\Jobs\CheckAttendancePenaltiesJob;
|
|
use App\Jobs\CleanupOrphanedMediaJob;
|
|
use App\Jobs\SendAttendanceReminderJob;
|
|
use Carbon\Carbon;
|
|
use Illuminate\Support\Facades\Schedule;
|
|
|
|
Schedule::command(GeneratePayrollCommand::class)
|
|
->daily()
|
|
->when(fn () => now()->day === 5)
|
|
->at('00:00');
|
|
Schedule::job(new SendAttendanceReminderJob)
|
|
->dailyAt('07:00')
|
|
->when(fn () => now()->dayOfWeek !== Carbon::SUNDAY);
|
|
Schedule::job(new CheckAttendancePenaltiesJob)->dailyAt('12:00');
|
|
Schedule::job(new CleanupOrphanedMediaJob)->monthlyOn(1, '01:00');
|