<?php

namespace App\Console;

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

class Kernel extends ConsoleKernel
{
    /**
     * Define the application's command schedule.
     * 
     *      crom
     *      * * * * * php /home/versio6/danoral/danoral.com/api/artisan schedule:run >> /dev/null 2>&1
     *
     *
     * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
     * @return void
     */
    protected function schedule(Schedule $schedule)
    {

        /*
        //carga la tasa del dia desde la pagina del BCV
        $schedule->command('tasacambio:update')
            ->weekdays()
            ->hourly()
            ->timezone('America/Caracas')
            ->between('19:00', '23:00');


        //termina los procesos colgados LINUX
        $schedule->command('killprocess')
            ->everyTenMinutes()
            //->everyMinute()
            ->timezone('America/Caracas')
            ->between('08:00', '19:00')
            ->appendOutputTo("killprocess.log");
        */

        /*
        //actualiza los datos de los edificios dolarizados
        $schedule->command('migrar:entidades-edif-apto')
            ->weekdays()
            ->timezone('America/Caracas')
            ->at('21:00')
            ->runInBackground();
        */
        
    }

    /**
     * Register the commands for the application.
     *
     * @return void
     */
    protected function commands()
    {
        $this->load(__DIR__.'/Commands');

        require base_path('routes/console.php');
    }
}
