- Implement tests to ensure job skips execution on weekends, when penalties are zero, or when no payroll period exists. - Validate late penalty creation for late check-ins and ensure no penalties for on-time or early check-ins. - Test absent penalties for employees without attendance records. - Ensure no duplicate penalties are created and that payroll recalculations are accurate after penalties are applied. - Handle multiple employees and edge cases, including employees without associated users. - Verify that the job can be dispatched to the queue and has the correct retry configuration.
9 lines
279 B
PHP
9 lines
279 B
PHP
<?php
|
|
|
|
use App\Console\Commands\GeneratePayrollCommand;
|
|
use App\Jobs\CheckAttendancePenaltiesJob;
|
|
use Illuminate\Support\Facades\Schedule;
|
|
|
|
Schedule::command(GeneratePayrollCommand::class)->monthlyOn(1, '00:00');
|
|
Schedule::job(new CheckAttendancePenaltiesJob)->dailyAt('00:00');
|