lundi 7 janvier 2019

Laravel 5 schedule issues - php artisan schedule:run works but actual schedule does not

Laravel version 5.7, PHP version 7.2 running on Apache2

The command in my crontab is as follows:

* * * * * php /var/www/dev-site/artisan schedule:run >> /dev/null 2>&1

My kernel is as follows:

<?php

namespace App\Console;

use App\Console\Commands\ImportInvoiceBatch;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;

class Kernel extends ConsoleKernel
{
    protected $commands = [
        ImportInvoiceBatch::class,
    ];

    protected function schedule(Schedule $schedule)
    {
        $schedule->command('import:invoice-batch')->everyMinute()->withoutOverlapping();
    }

    protected function commands()
    {
        $this->load(__DIR__.'/Commands');

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

Running my defined command as "php artisan import:invoice-batch" works correctly, and even running "php artisan schedule:run" recognizes everything and runs the task as expected, but the scheduler is not being executed ever minute as should be happening. Is there anything I am missing? Thanks in advance.



from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2RgQz2P
via IFTTT

Aucun commentaire:

Enregistrer un commentaire