logging cronjob non-zero return codes

Tim Writer tim-s/rLXaiAEBtBDgjK7y7TUQ at public.gmane.org
Wed Nov 9 16:49:46 UTC 2005


Fraser Campbell <fraser-eicrhRFjby5dCsDujFhwbypxlwaOVQ5f at public.gmane.org> writes:

> Tim Writer wrote:
> 
> > How about this?
> >     mm hh dd MM wd some-script || logger rc=$?
> 
> > I'm not aware of a builtin.
> 
> 
> Good idea, might have to resort to that.
> 
> Had hoped to copy a config file across all the servers, editing thousands of
> cronjobs won't be fun.  Will think of suggesting this as a standard, this and
> banning all crap scripts that don't do any error checking/reporting of their
> own :-(

In that case, it might be easier to modify cron and publish that across all
servers. I would think this would be an easy change to cron.

Having said that, if you have a lot of "crap scripts that don't do any error
checking/reporting of their own", can you rely on their exit status? You may
have a bigger job on your hands than you think.

-- 
tim writer <tim-s/rLXaiAEBtBDgjK7y7TUQ at public.gmane.org>                                  starnix inc.
647.722.5301                                      toronto, ontario, canada
http://www.starnix.com              professional linux services & products
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list