- 论坛徽章:
- 0
|
crontab
*/1 * * * * /home/test.sh
脚本:/home/test.sh
/bin/echo "test crontab !"
权限:
drwxr-xr-x 4 root root 4096 Feb 15 16:29 .
drwxr-xr-x 25 root root 4096 Feb 11 21:36 ..
drwxr-xr-x 2 root root 4096 Feb 1 17:46 javapro
drwxr-xr-x 6 root root 4096 Feb 14 23:25 stsrc
-rwxrwxr-x 1 root root 28 Feb 15 16:29 test.sh
message日志:
Feb 15 16:46:01 QY-ProxyServer2 crond(pam_unix)[22451]: session closed for user root
Feb 15 16:47:01 QY-ProxyServer2 crond(pam_unix)[22455]: session opened for user root by (uid=0)
Feb 15 16:47:01 QY-ProxyServer2 crond(pam_unix)[22455]: session closed for user root
Feb 15 16:48:01 QY-ProxyServer2 crond(pam_unix)[22460]: session opened for user root by (uid=0)
Feb 15 16:48:01 QY-ProxyServer2 crond(pam_unix)[22460]: session closed for user root
不知为什么?搞了半天还是不行.哪位能帮忙啊.
cron日志:
Feb 15 16:39:01 QY-ProxyServer2 crond[22427]: (root) CMD (root /home/test.sh)
Feb 15 16:40:01 QY-ProxyServer2 crond[22431]: (root) CMD (/usr/lib/sa/sa1 1 1)
Feb 15 16:40:01 QY-ProxyServer2 crond[22432]: (root) CMD (root /home/test.sh)
Feb 15 16:41:01 QY-ProxyServer2 crond[22436]: (root) CMD (root /home/test.sh)
Feb 15 16:42:01 QY-ProxyServer2 crond[22439]: (root) CMD (root /home/test.sh)
Feb 15 16:43:01 QY-ProxyServer2 crond[22442]: (root) CMD (root /home/test.sh)
Feb 15 16:44:01 QY-ProxyServer2 crond[22445]: (root) CMD (root /home/test.sh)
Feb 15 16:45:01 QY-ProxyServer2 crond[22448]: (root) CMD (root /home/test.sh)
Feb 15 16:46:01 QY-ProxyServer2 crond[22452]: (root) CMD (root /home/test.sh
cron执行了,脚本也执行了,但无法得到正确结果 |
|