设置好crontab之后无法自动执行脚本经过几次测试之后,发现echo等命令可以生效,但设置执行脚本则不会生效。
crontab设置如图时可以生效:
当我把crontab设置改成如下是却未生效(直接执行 test.sh 没有问题):
test.sh
看了有的回答,将配置改为如下形式仍然未生效:
感谢大家的帮助~!
ringa_lee
~Replace with absolute path
I just encountered this problem a few days agoIt may be that there is output in your sh file causing the script to automatically exit after a few seconds
The solution is to remove all output from the script Let the script not have any output
~Replace with absolute path
I just encountered this problem a few days ago
It may be that there is output in your sh file
causing the script to automatically exit after a few seconds
The solution is to remove all output from the script
Let the script not have any output