免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1195 | 回复: 6
打印 上一主题 下一主题

Crontab 並不能自動運行 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-11-24 11:22 |只看该作者 |倒序浏览
各位好,
我有一台服務器是用 Slackware 10 的. 近多月來發現它的 cron 並沒有在特定時間內自動運行..
而crond 是啟動的. 並把需要運行的 script 放到 /etc/cron.daily 內.
並設為 59 23 * * * /usr/bin/run-parts /etc/cron.daily 1> /dev/null

而script 是沒有錯誤, 是可以手動運行的...
在 /var/log/cron 內發現這些

  1. Nov 19 06:10:56 aa crond[21699]: unable to exec /usr/sbin/sendmail -t, user -oem, output to sink null
  2. Nov 19 10:05:06 aa crond[21791]: unable to exec /usr/sbin/sendmail -t, user -oem, output to sink null
  3. Nov 19 11:05:07 aa crond[21817]: unable to exec /usr/sbin/sendmail -t, user -oem, output to sink null
  4. Nov 19 18:10:56 aa crond[21974]: unable to exec /usr/sbin/sendmail -t, user -oem, output to sink null
  5. Nov 19 20:05:06 aa crond[22020]: unable to exec /usr/sbin/sendmail -t, user -oem, output to sink null
  6. Nov 19 23:50:06 aa crond[22118]: unable to exec /usr/sbin/sendmail -t, user -oem, output to sink null
  7. Nov 20 00:04:56 aa crond[22126]: unable to exec /usr/sbin/sendmail -t, user -oem, output to sink null
  8. Nov 20 06:10:56 aa crond[22303]: unable to exec /usr/sbin/sendmail -t, user -oem, output to sink null
  9. Nov 20 10:05:06 aa crond[22395]: unable to exec /usr/sbin/sendmail -t, user -oem, output to sink null
  10. Nov 20 11:05:06 aa crond[22422]: unable to exec /usr/sbin/sendmail -t, user -oem, output to sink null
  11. Nov 20 18:10:56 aa crond[22656]: unable to exec /usr/sbin/sendmail -t, user -oem, output to sink null
  12. Nov 20 20:05:06 aa crond[22706]: unable to exec /usr/sbin/sendmail -t, user -oem, output to sink null
  13. Nov 20 23:50:06 aa crond[22804]: unable to exec /usr/sbin/sendmail -t, user -oem, output to sink null
  14. Nov 21 00:04:56 aa crond[22812]: unable to exec /usr/sbin/sendmail -t, user -oem, output to sink null
  15. Nov 21 06:10:56 aa crond[22989]: unable to exec /usr/sbin/sendmail -t, user -oem, output to sink null
复制代码


由於之前服務器並不需要sendmail, 所以沒有裝sendmail, 但當我發現這錯誤後, 就把sendmail重裝上, 終於在昨天沒有再出現 Nov 22 號的訊息. 但 cron 並沒有在 22 號晚上 23時59分被運行.
請問我的情況應該怎去更正呢.
謝謝各位.

论坛徽章:
0
2 [报告]
发表于 2006-11-24 12:24 |只看该作者
把标准输出的重定向先去掉试试看.

论坛徽章:
0
3 [报告]
发表于 2006-11-24 13:48 |只看该作者
原帖由 我是大宇 于 2006-11-24 12:24 发表
把标准输出的重定向先去掉试试看.


再請教. 在那裡動手呢... thx

论坛徽章:
0
4 [报告]
发表于 2006-11-27 10:46 |只看该作者
再推一下, 請教各位. 謝謝.

论坛徽章:
0
5 [报告]
发表于 2006-12-04 12:27 |只看该作者
再推一下. 請各位再指點指點. thx

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
6 [报告]
发表于 2006-12-04 13:30 |只看该作者
並設為 59 23 * * * /usr/bin/run-parts /etc/cron.daily

论坛徽章:
0
7 [报告]
发表于 2006-12-05 14:53 |只看该作者
原帖由 greysky-zfj 于 2006-12-4 13:30 发表
並設為 59 23 * * * /usr/bin/run-parts /etc/cron.daily


呢句已經有的啦...
請再指教.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP