我有一个cronjob设置和运行,但日志文件不断覆盖每次运行。 我希望每次运行cron时都要附加wget输出。
为什么是这个,如何解决?
0 0 * * * wget url/script.php -O - >> /home/user/app/logs/logfile
man wget -a logfile --append-output=logfile Append to logfile. This is the same as -o, only it appends to logfile instead of overwriting the old log file. If logfile does not exist, a new file is created.
试试这个scheme。