【发布时间】:2016-06-09 04:12:56
【问题描述】:
我有一个脚本.sh,其中有一个curl 命令:
curl --digest "http://xxxxxxx.xxx/mail.php?email=xxxx@xxx.xx";
从终端这很好用:
./script.sh #(mail arrives in my box)
从 php 这很好用:
shell_exec('./phpsc.sh'); // (mail arrives in my box)
从终端这很好用:
at -f phpsc.sh now + 5 minute
# (job created, mail arrives in my box after 5 minutes)
从 php 这将不起作用:
shell_exec('at -f phpsc.sh now + 5 minute'); //:( :(
即使我将at 命令放入脚本并从php 运行脚本at 命令,它也会被忽略:(
【问题讨论】:
-
phpsc.sh 和 script.sh 之间的区别尚不清楚 - 但可能从添加
at -f _add_path_here_/phpsc.sh now + 5 minute的路径开始 -
是的,我确实放了完整路径,但什么也没放 :( :(
标签: curl php linux shell at-job