Laravel Task Scheduler Error appendOutputTo

I added the following line to Console/Kernal

 protected function schedule(Schedule $schedule) { $schedule->command('queue:work') ->everyMinute() ->appendOutputTo($filePath); } 

Then at the cmd prompt, I ran the following artisan command to run the scheduled tasks, but I get the following error

 php artisan schedule:run 

Error:

  [Symfony\Component\Debug\Exception\FatalErrorException] Call to undefined method Illuminate\Console\Scheduling\Event::appendOutputTo() 

Where, as when using ->sendOutputTo($filename) , instead it works fine, of course, it does not add, but overwrites the file.

Thanks,

TO

+6
source share
1 answer

Yes, I was right, appendOutputTo () is missing in Laravel 5.1.

The good news is that it will be available in Laravel 5.2.

laravel-news-5.2-whats-coming

Update: 10-Dec-2015 as sstarlight mentioned, and I rechecked (searched for the appendOutputTo function), and yes, now it is present in vendor/laravel/framework/src/Illuminate/Console/Scheduling/Event.php unlike the previous one. Thanks laravel and thanks sstarlight for letting us know.

+2
source

All Articles