我已经设置crontab
如下:
*/5 0 * * * /www/permitChat.sh
和/www/permitChat.sh
这是:
# We are setting the name of file
# in the variable along with complete path.
sFilePath=`date +\/www\/ChatLogs\/%Y\/%m/%d_%m_%Y.txt`
# First we set its permissions to
# readable by all users, and then
# modify them to be writable by only root.
chmod a=r $sFilePath
chmod u+w $sFilePath
ls -lh $sFilePath
我面临的麻烦是,cron 每天下午 12:00 之后执行,而不是每 5 分钟在凌晨 12:00 到凌晨 01:00 执行一次。
可能出了什么问题?我的所有系统变量似乎都已同步。