<?php

namespace App\Console;

use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;

class Kernel extends ConsoleKernel
{
    protected function schedule(Schedule $schedule): void
    {
        // Recordatorio diario de horas — lunes a viernes a las 4:30 PM (hora Colombia UTC-5)
        // En servidor UTC se programa a las 21:30
        $schedule->command('hojas:recordatorio-diario')
                 ->weekdays()
                 ->at('21:30')
                 ->timezone('America/Bogota')
                 ->withoutOverlapping()
                 ->appendOutputTo(storage_path('logs/recordatorio.log'));
    }

    protected function commands(): void
    {
        $this->load(__DIR__.'/Commands');
        require base_path('routes/console.php');
    }
}
