Curl linux作业的at命令无法从php运行

Curl linux作业的at命令无法从php运行,curl,php,linux,shell,at-job,ksh,Curl,Php,Linux,Shell,At Job,Ksh,我有一个脚本.sh,里面有一个命令: 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 # (j

我有一个脚本.sh,里面有一个命令:

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命令也会被忽略:

我知道有时需要使用源代码来调用环境变量

如果您使用了以下内容以外的内容,请尝试进行调整:


我已经找到了解决办法


我从/etc/at.deny中删除了www数据,现在在CentOS 7中的php sell_exec中的'at'comand工作正常,我不得不在/etc/at.allow添加“apache”。

phpsc.sh和script.sh之间的区别还不清楚-但也许可以先在at-f\u add\u path\u这里添加一个路径\uu/phpsc.sh现在+5分钟是的,我已经添加了完整的路径,但什么都没有::对不起,我不明白我必须做什么::
shell_exec('source ${HOME}/.kshrc ; at -f phpsc.sh now + 5 minute');