Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Since PHP does one thing at the time, for a similar task (pinging) I created a batch script that calls multiple php jobs using arguments.</p> <p>So the loop is in the batch file. This also distributes the load on multiple CPUs, since jobs are spread. The batch read information for scanning from a CVS file that has 10 items per row (to run 10 processes at the time).</p> <p>It is running on a windows server, but same can be applied on any.</p> <p>here is the content of my batch file as an example:</p> <hr> <p>@Echo Off For /F "usebackq tokens=1-10 delims=," %%a in ("D:\php_run\all_locations_10.cvs") Do (<br> echo Scanning: %%a<br> start "Scanning %%a" "C:\Program Files (x86)\PHP\v5.3\php.exe" "-f" "D:\php_run\wkstn_scan.php" "%%a"<br> echo Scanning: %%b start "Scanning %%b" "C:\Program Files (x86)\PHP\v5.3\php.exe" "-f" "D:\php_run\wkstn_scan.php" "%%b"<br> echo Scanning: %%c<br> start "Scanning %%c" "C:\Program Files (x86)\PHP\v5.3\php.exe" "-f" "D:\php_run\wkstn_scan.php" "%%c"<br> echo Scanning: %%d<br> start "Scanning %%d" "C:\Program Files (x86)\PHP\v5.3\php.exe" "-f" "D:\php_run\wkstn_scan.php" "%%d"<br> echo Scanning: %%e<br> start "Scanning %%e" "C:\Program Files (x86)\PHP\v5.3\php.exe" "-f" "D:\php_run\wkstn_scan.php" "%%e"<br> echo Scanning: %%f<br> start "Scanning %%f" "C:\Program Files (x86)\PHP\v5.3\php.exe" "-f" "D:\php_run\wkstn_scan.php" "%%f"<br> echo Scanning: %%g<br> start "Scanning %%g" "C:\Program Files (x86)\PHP\v5.3\php.exe" "-f" "D:\php_run\wkstn_scan.php" "%%g"<br> echo Scanning: %%h<br> start "Scanning %%h" "C:\Program Files (x86)\PHP\v5.3\php.exe" "-f" "D:\php_run\wkstn_scan.php" "%%h"<br> echo Scanning: %%i<br> start "Scanning %%i" "C:\Program Files (x86)\PHP\v5.3\php.exe" "-f" "D:\php_run\wkstn_scan.php" "%%i"<br> echo Scanning: %%j<br> start /WAIT "Scanning %%j" "C:\Program Files (x86)\PHP\v5.3\php.exe" "-f" "D:\php_run\wkstn_scan.php" "%%j"<br> <br> )<br></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload