Php 等待Curl命令结束
我有这个shell脚本,可以连续运行两个php脚本Php 等待Curl命令结束,php,shell,curl,Php,Shell,Curl,我有这个shell脚本,可以连续运行两个php脚本 while [ true ] do curl -s 'example.com/first.php' > /dev/null curl -s 'example.com/second.php' > /dev/null sleep 30; done 但有时我认为它不能正常工作,例如它同时运行两次first.php。 curl命令是否在first.php进程结束之前运行second.php?我怎样才能解决这个问题?
while [ true ]
do
curl -s 'example.com/first.php' > /dev/null
curl -s 'example.com/second.php' > /dev/null
sleep 30;
done
但有时我认为它不能正常工作,例如它同时运行两次first.php
。
curl
命令是否在first.php
进程结束之前运行second.php
?我怎样才能解决这个问题?
我也没有在我的first.php
和second.php中使用exit