logging cronjob non-zero return codes

Tim Writer tim-s/rLXaiAEBtBDgjK7y7TUQ at public.gmane.org
Mon Nov 7 22:37:11 UTC 2005

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

> Does anyone know if there's a way to make cron log failed return codes from
> scripts?  For example on solaris, /var/cron/log will contain entries such as:
>    <  root 12978 c Fri Nov  4 02:01:00 2005 rc=1

How about this?

    mm hh dd MM wd some-script || logger rc=$?

I'm not aware of a builtin.



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