【发布时间】:2016-11-06 08:23:06
【问题描述】:
我想执行 2 个脚本:s1 和 s2。 s2 必须在 s1 之后执行。
s1的执行时间是2800秒,我需要在s2之后执行s1。我应该将sleep(3000) 放在我的 php 中它们之间,还是第二个会在第一个之后执行自动?
我试过了:
exec('python s1 '); //time of execution is 2800s
sleep(3000); // i want to be sure that the first one is finished
shell_exec('php /home/Parik/s2.php');
【问题讨论】: