I added following line in Console/Kernal
protected function schedule(Schedule $schedule)
{
$schedule->command('queue:work')
->everyMinute()
->appendOutputTo($filePath);
}
Then in cmd prompt I ran the following artisan command to run the scheduled tasks but I get following error
php artisan schedule:run
Error:
[Symfony\Component\Debug\Exception\FatalErrorException]
Call to undefined method Illuminate\Console\Scheduling\Event::appendOutputTo()
Where as when I use ->sendOutputTo($filename)
instead it works fine, of course it doesn't append but overwrite a file.
Thanks,
K
Yes, I was right, appendOutputTo() isn't present in Laravel 5.1.
Good news is 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 appendOutputTo function), and yes it is now present in
vendor/laravel/framework/src/Illuminate/Console/Scheduling/Event.php
unlike before. Thanks laravel and thanks sstarlight to let us know.