GOGREEN PC TUNEUP
Learn More


Insta-Install

myBlog

myBlog Home

Back to Blog MTNCOMP


Batch cmd script for Project Search 43

Published: Wednesday, April 3, 2019 written by Drew Jackson
View Count: 52
Keywords: cmd, batch, loop, ms-dos



I was trying to figure out a way to spin up 20 instances of a project search 43 processor and this little trinket worked just fine... now, I spin up this cmd script of 3 other computers, some 5 instances, some 10, some 20... that's 35 processors running, 100 queries per minute x 35 = 3500 queries per minute. that's not too much to ask of my DNS server, is it?
 
restart.cmd
 
del "C:\ProgramData\ProjectSearch43\ProjectSearch43\1.0.0.0\quit.txt"
for /l %%x in (1, 1, 20) do (
echo %%x
start projectsearch43 process
)
 
in project search 43 application, if the argument value of process is found at launch, the processing starts, and while in the processing loop if the quit.txt file is found in the application directory, it nicely ends processing and nicely closes the application and all database handles (2 of them). if i bring up project search 43 by itself and without arguments and click stop everyone then the file quit.txt is created and each processor eventually sees the quit.txt file and checks out and ends processing. that is why when i launch the restart.cmd the first thing it does is deletes the quit.txt file so launching project search 43 with auto process argument it does not just stop at launch.
 
https://stackoverflow.com/questions/2591758/batch-script-loop
 
more to come...

if you found this article helpful, consider contributing $10, 20 or so..to the author. more authors coming soon
FYI we use paypal or patreon, patreon has 3x the transaction fees, so we don't, not yet.

© 2019 myBlog™ v1.1 All rights reserved. We count views as reads, so let's not over think it.