19,620
社区成员




SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/opt
MAILTO=root
HOME=/
# * * * * * user-name command to be executed
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
03 * * * * root /opt/pro_some.sh
#!/bin/bash
ls >> result.txt
恩 我每次改crontab文件时都会restart的。 [quote=引用 6 楼 mp777323 的回复:] 还有crond服务开了吗?
pro_some.sh 改成 #!/bin/bash ls >> /home/result.txt 文件/命令 的路径最好都用绝对路径
恩 我每次改crontab文件时都会restart的。 还有crond服务开了吗?
还有crond服务开了吗?
我试过了,这样也不行,难道是我的系统出问题了吗? [quote=引用 2 楼 jdwq33 的回复:] [quote=引用 1 楼 mp777323 的回复:] 03 * * * * sh /opt/pro_some.sh
我试过了,这样也不行,难道是我的系统出问题了吗? [quote=引用 1 楼 mp777323 的回复:] 03 * * * * sh /opt/pro_some.sh
我试过了,这样也不行,难道是我的系统出问题了吗? 03 * * * * sh /opt/pro_some.sh
03 * * * * sh /opt/pro_some.sh