CentOS 的crontab - Linux

Table of Contents

目前我是使用CentOS 5..

關於crontab都一直正常運作

crond也有正常work..但是似乎都不會去執行crontab

我是修改/etc/crontab

crontab內容如下:

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
*/5 * * * * root /usr/sbin/ntpdate time.stdtime.gov.tw && /sbin/hwclock -w

照理說每五分鐘就要自動對時一次吧@@?

但是都不work...Orz 有什麼方法可以檢查的呢?

謝謝 :)


--

All Comments

Oscar avatarOscar2008-12-31
要不要查一下 log 看吐出啥訊息?
Noah avatarNoah2009-01-02
可以請問一下去哪看嗎@@? 謝謝
Puput avatarPuput2009-01-05
/var/log/cron or /var/log/messages
Dorothy avatarDorothy2009-01-08
Shell Script 要另外寫成一個檔案, 不能直接用在 crontab
Dorothy avatarDorothy2009-01-11
詳細我有點忘了...
Megan avatarMegan2009-01-14
不是用crontab -e去寫,crontab -l列出嗎?
Connor avatarConnor2009-01-17
在/etc/cron.daily/等目錄下的才是放sh進去自動執行
Jacky avatarJacky2009-01-22
把指令 () 起來看看... ( run1 && run2 )
Connor avatarConnor2009-01-26
我在4樓說的是別的狀況, 我弄錯了...
Todd Johnson avatarTodd Johnson2009-01-29
給A大 /etc/crontab 是系統的...