大家好,StackOverflow 的所有优秀人士。
我以前从未尝试过的东西有问题。这是我的情况。
我以 root 身份 ssh 进入我的专用服务器。我运行crontab -e
,crontab 文件现在打开了,我写在这个简单的行:
* * * * * /usr/bin/touch /tmp/chekifworks.txt
然后我保存它并收到一条消息,指出安装了新的 crontab 作业。一切都很棒,除了它什么都不做。但猜猜怎么了!如果我将其更改为:
* * * * * /root/script.sh
并且 /root/script.sh 的内容只是touch /tmp/testing.txt
它仍然什么都不做。
输出crontab -l
:
* * * * * /usr/bin/touch /tmp/checkifworks.txt
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /etc/webmin/status/monitor.pl
@reboot /etc/init.d/shout
请各位大神帮我解决这个问题,如果您需要,我很乐意提供您可能需要的任何信息。
更新:我chmod a+x /root/scrip.sh
还是没有做好。