RE: Cron management...

  • From: Iggy Fernandez <iggy_fernandez@xxxxxxxxxxx>
  • To: "oracle-l@xxxxxxxxxxxxx" <oracle-l@xxxxxxxxxxxxx>
  • Date: Mon, 13 Apr 2015 10:22:30 -0700

re: <time> <script> > /tmp/jobname.out 2>&1

How about including the timestamp in the name of the log file; for example,
/u01/joblogs/jobname.$(date +%y%m%d%H%M%S)


Cron jobs are also very easy to troubleshoot. Unlike at many shops, we
mandate this syntax in crontab:

<time> <script> > /tmp/jobname.out 2>&1

I believe throwing away stdout and stderr is a big mistake. It would make
troubleshooting very difficult. Directing them to mail (by default) is not
good practice either because it's harder to read and could increase mailbox
size unintentionally.

Yong Huang
P.S. more tips at http://yong321.freeshell.org/computer/CronJobs.html
--
//www.freelists.org/webpage/oracle-l


Other related posts: