linux - crontab无法自动执行脚本
ringa_lee
ringa_lee 2017-04-17 14:51:49
0
2
728

设置好crontab之后无法自动执行脚本
经过几次测试之后,发现echo等命令可以生效,但设置执行脚本则不会生效。

  1. crontab设置如图时可以生效:

  1. 当我把crontab设置改成如下是却未生效(直接执行 test.sh 没有问题):

  1. 看了有的回答,将配置改为如下形式仍然未生效:

感谢大家的帮助~!

ringa_lee
ringa_lee

ringa_lee

reply all(2)
阿神

~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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template