<?php

use App\Jobs\CaptureDailyProgressSnapshot;
use App\Jobs\NotifyOverdueTasks;
use App\Jobs\SendScheduledReport;
use Illuminate\Foundation\Inspiring;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Schedule;

Artisan::command('inspire', function () {
    $this->comment(Inspiring::quote());
})->purpose('Display an inspiring quote');

// Avisar a los asignados de tareas de incidencia vencidas (una vez por tarea).
Schedule::command('issues:notify-overdue')->dailyAt('07:00');

// Avisar de tareas vencidas (tareas independientes)
Schedule::job(new NotifyOverdueTasks)->dailyAt('07:00');

// Capturar snapshot diario de progreso (para curva S, EVM, desvíos)
Schedule::job(new CaptureDailyProgressSnapshot)->dailyAt('06:30');

// Enviar informes programados diarios (08:00)
Schedule::job(new SendScheduledReport)->dailyAt('08:00');
