Re: cron job mergelog failure



On Wed, Feb 08, 2012 at 10:57:54AM -0500, Tony Baldwin wrote:
0 1 * * * mergelog /var/log/apache2/access.log [...]
Every day I get an e-mail telling me this failed.

Now, I can go in and to this manually,
Why can't cron do it without my intervention?


What reason does the email give for the failure?
Chris


mv: cannot stat `/var/log/apache2/MY.log': No such file or directory
Clearly not merging logs and creating the MY.log file.
I will try with the fully path and see happens tonight.

Your first cron job:
0 1 * * * mergelog /var/log/apache2/access.log /var/log/apache2/other_vhosts_access.log /var/log/apache2/my.log > MY.log

This does not run with /var/log/apache2/ as $PWD, so MY.log won't be
created in that directory. Try being explicit about the path to MY.log,
e.g. /var/log/apache2/MY.log

noah

Attachment: signature.asc
Description: Digital signature



Relevant Pages

  • Re: cron job mergelog failure
    ... Why can't cron do it without my intervention? ... What reason does the email give for the failure? ... I will try with the fully path and see happens tonight. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: cron job mergelog failure
    ... Why can't cron do it without my intervention? ... What reason does the email give for the failure? ... I will try with the fully path and see happens tonight. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: maintenance
    ... Another reason not to own a Mac. ... OS X no longer users cron for this... ... system initialization, called systems scripts, run startup items, and ...
    (comp.sys.mac.advocacy)
  • Re: chkrootkit: LKM trojan(?) and strange cron behaviour
    ... > virtually nothing when I went searching the lists. ... I believe that this is precisely the reason for the false alarm. ... > when cron decided to stop working. ... Did you search for a core file? ...
    (freebsd-questions)
  • Re: Cron on qmail not sending me logs
    ... > For some reason, I am not receiving mail sent from cron to root. ... I cannot see any of my daily cron logs. ... The MAILTO will cause every job in the crontab to send its output ...
    (freebsd-questions)