Skip to content
WJunction - Webmaster Forum

some batch help ?

Status
Not open for further replies.
Hi !
If you aren't programming batch 2 years you totally forget anything :( ,believe me i am in this situation :D .
I was wondering if you can help me making srcript for killing all processes called php-cgi.exe (because they grow :|) except one of them. I hope you get my mind.

:loop
if php-cgi.exe > 1 process (
TASKKILL /F /IM "php-cgi.exe")
goto loop

the italics font must be translated into batch..
 

7 comments

Code:
TASKKILL /F /IM "php-cgi.exe"

This will probably kill all php-cgi.exe processes.

You can also use PID.
Code:
TASKKILL /F /PID pidhere

Anyway I don't really get you, try to explain it more please.
 
l0calh0st - I think paint will explain it better :D

51djcl.jpg


I want to kill all php-cgi.exe except one of them (is it possible the newest?)...
 
WTF? php-cgi spawning childs in windows. I trough it was disabled in windows as I never managed to make PHP_FCGI_CHILDREN work.

And by the way. Each child can only process one request simultaneously.

Can you please tell us more details about your server configuration?
 
I'm sure the application won't work properly if you kill it's processes anyway you can kill all child processes using their PID's

Code:
TASKKILL /F /PID pidhere1
TASKKILL /F /PID pidhere2
TASKKILL /F /PID pidhere3
 
Status
Not open for further replies.

About the author

Porsche_maniak
Established Member · Joined
Auto racing,Porsche,Web Development
283
Messages
0
Reactions
16
Points
Grow your business

Advertise on WJunction

Connect with an established international community of webmasters, hosting providers, developers and online entrepreneurs.

  • Premium & Premium+ Sticky
  • Dedicated section banners
  • Site-wide banner advertising
Explore advertising options
Back
Top Bottom