Re: cron job mergelog failure
On Wed, Feb 08, 2012 at 08:35:44AM -0800, Noah Meyerhans wrote:
> 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
I'm guessing this is precisely the (rather so obvious it hid in plain
(senility...it's my only excuse...I turned 30 for the 13th time on
all tony, all the time!