Have 5 scripts running at any given time
I have a bash script (running under CentOS 6.4) that launches 90 different PHP scripts, ie. #!/bin/bash php path1/some_job_1.php& php path2/some_job_2.php& php path3/some_job_3.php& php path4/some_job_4.php& php path5/some_job_5.php php path6/some_job_6.php& php path7/some_job_7.php& php path8/some_job_8.php& php path9/some_job_9.php& php path10/some_job_10.php ... exit 0 In order to avoid overloading my server, I use the ampersand & , it works, but my goal is to always have 5 scripts running at the same time Is there a way to achieve this? This question is popped several times, but I could