ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Linux crontab job 中的log记录及异常处理

Linux crontab job 中的log记录及异常处理

原创 Linux操作系统 作者:tolywang 时间:2010-03-01 00:35:45 0 删除 编辑

dfmsstyrac01<*mxdell1*/>$crontab -l

*/20 * * * * sh /u01/run/autoreco 1>/u01/run/log/autoreco.log  2>>/u01/run/log/autoreco.bad

10 * * * * sh /u01/run/autodel 1>/u01/run/log/autodel.log  2>/u01/run/log/autodel.bad

or

10 * * * * sh /u01/run/autodel 1>/dev/null  2>1

 

If you have not any exception handling in the crontab job , the file /var/spool/mail/xxxx (eg: xxxx=oracle) will increate its size  until the size of   /var or   /   is full  ,  there will be some issues in the linux OS  . 

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/35489/viewspace-628810/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
Oracle , MySQL, SAP IQ, SAP HANA, PostgreSQL, Tableau 技术讨论,希望在这里一起分享知识,讨论技术,畅谈人生 。

注册时间:2007-12-10

  • 博文量
    5595
  • 访问量
    14695628