I'm currently running these lines in a PHP script:
foreach ($list as $route)
{
exec('php-cgi ./nextbus-route_stop_predictions.php route=' . $route['route_id']);
}
nextbus-route_stop_predictions.php takes about 15 seconds to run and exec() is ran about 12 times. I was wondering if PHP was able to run these those command lines without needing to wait for the output of the previous exec(). So basically, I want to run this asynchronously/multi-processes.
Update
For anyone still looking for the answer, I used nohup and piped the output to /dev/null