W
W
WebDev2016-08-08 15:00:56
Laravel
WebDev, 2016-08-08 15:00:56

Laravel not running command via scheduler?

There is a TestCommand command which creates record in a DB.
I launch through the console
php artisan command:TestCommand
Everything works.
Now I add this command to Scheduler (file Console\Kernel.php)

protected function schedule(Schedule $schedule)
    {
         $schedule->command('TestCommand')->everyMinute();
    }

I add artisan schedule:run to cron php or run it manually and nothing happens. In this case, an entry is added to the log that the command was launched.
What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question