mercredi 28 octobre 2015

Laravel Task Scheduler Error appendOutputTo

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



via Chebli Mohamed

1 commentaire:

gildniy a dit…

Then use this :
"->sendOutputTo($filename, true)" it's the same as
"->appendOutputTo($filename)"

Enregistrer un commentaire