Re: cron job mergelog failure
On Wed, 2012-02-08 at 01:27 -0500, Tony Baldwin wrote:
> 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!
May be its because of $PATH inside cron. It will better if you use full
path of "mergelog".