Laravel cron error does not execute

1

I have a cron that should be running every day in an hour.

$ schedule-> command ('inspire') -> dailyAt ('15: 00 ');

but it is not running

Code

<?php

namespace App\Units;

use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel;
use App\Console\Commands\EnvioEmailBlCron;

class ConsoleKernel extends Kernel
{
    /**
     * The Artisan commands provided by your application.
     *
     * @var array
     */
    protected $commands = [

        \App\Console\Commands\EnvioEmailBICron::class 
    ];

    /**
     * Define the application's command schedule.
     *
     * @param \Illuminate\Console\Scheduling\Schedule $schedule
     */
    protected function schedule(Schedule $schedule)
    {

        //configuração do cron
        $schedule->command('inspire')->dailyAt('15:00'); 
        $schedule->command('envioemailbicron:cron')->daily(); // email diários
    }

    /**
     * Register the Closure based commands for the application.
     */
    protected function commands()
    {
    }
}

Command running in cmd:

  

php artisan envioemailbicron: cron

    
asked by anonymous 30.10.2017 / 19:37

2 answers

1

Try this out

$schedule->command('envioemailbicron:cron')->everyMinute();
    
30.10.2017 / 21:04
0

To run the Inspire command you need to add it to the kernel ..

protected $commands = [

    \App\Console\Commands\EnvioEmailBICron::class,
    \App\Console\Commands\Inspire::class,


];

If your Inspire command is in the default path, just add this to your protected

    
30.10.2017 / 21:18