在任务调度中附加输出

rap*_*2-h 6 php laravel laravel-5

sendOutputTo 在任务调度中使用,我们可以将任务输出存储在文件中:

$schedule->command('test')->everyMinute()->sendOutputTo(storage_path('test'));
Run Code Online (Sandbox Code Playgroud)

但我不想只存储最后一次执行,我需要一个日志.如何在单个文件中记录计划任务输出?

小智 16

不是appendOutputTo你想要的?

$schedule->command('test')->everyMinute()->appendOutputTo(storage_path('test'));
Run Code Online (Sandbox Code Playgroud)