Bash – Unable to get cron to append output from wget

bashcronwget

I have a cronjob setup and running, but the logfile keeps getting overwritten every time it runs. I would like for the wget output to be appended each time the cron runs.

Why is this and how do I fix it?

0 0 * * * wget url/script.php -O - >> /home/user/app/logs/logfile

Best Answer

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.

Try with this one scheme.

Related Topic