[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

cron job mergelog failure

I have the following in my root crontab on my webserver:

0 1 * * * mergelog /var/log/apache2/access.log
/var/log/apache2/other_vhosts_access.log /var/log/apache2/my.log >
  4 2 1 * * * mv /var/log/apache2/MY.log /var/log/apache2/my.log
    5 5 1 * * * webalizer

Every day I get an e-mail telling me this failed.

Now, I can go in and to this manually, 
mergelog my.log access.log other_vhosts_access.log > MY.log
# to merge the existing merged log with the new logs
mv MY.log my.log
to move the newly merged log to my.log (which webalizer is configured to
run webalizer

Why can't cron do it without my intervention?

all tony, all the time!

Reply to: