I run many times PHP script in one minute in my server using command line. but i want to add some maximum for it.
this script not must be run each time more than 10 process for PHP.
#1 php -r myhardandlongprocess.php
#2 php -r myhardandlongprocess.php
..
#10 php -r myhardandlongprocess.php
any standard way for this?
You could use the
exec()command to do that:EDIT: Changed to
exec()sincesystem()outputs everything directly.