1

I have multiple instances of a programm running and from time to time it stops responding. I need to check if processes of X have not been responding for >X seconds, and if yes, kill this exact process - not all instances of X, but this special one.

Monitoring programms like Kiwi or Process Explorer can only shutdown either process with PID X or ALL instanced of process X.

Can anyone share a programm/script that gives me the ability to solve this problem ?

Closer information: It is a game that i start on different accounts and sometimes the game fails to enter a session and simply stops responding, leading the account to be AFK ingame and simply wait until the session stops and then the account is queueing up again - when this happens often, there are penalties or even bans... If the account enters the session normally nothing goes wrong for anyone.

2

You can play around the script using :loop , goto loop and timeout exemple :
:loop
taskkill /im "League of Legends.exe" /fi "STATUS eq NOT RESPONDING"
timeout /t 5 /NOBREAK
goto loop

  • does the "/NOBREAK" make it check wether the condition "not responding" is true for the duration of the 5 second timeout ? Because i only want it to kill the task, if it doesn´t respond for >5 seconds - not if it doesn´t respond for 2 seconds and (would) then carry on running – Lennart Menzel Mar 14 '16 at 1:02
  • unfortunately not, the script keeps looping and repeating the same command that terminate the process anytime it finds it "not responding" , the timeout only delay when the next command executes which is after 5 seconds; thus i think u will need to use if and else statements ... i dont know how yet , i will try to figure it out tomorrow morning ___ good night. – Fayssal Ozilf Mar 14 '16 at 1:55
0

try process Hacker ....it almost like process explorer but with much advanced options, I'm not sure what your situation is, I hope u provide more informations like : is it a game on browser or something like origin and steam ...ect

  • It´s the game "League of Legends" that is installed as a normal programm and then usually started with a launcher application that updates the game and let´s you queue up for games. I use a console queuer that lets me start multiple accounts at the same time. When the 3rd party launching console is started and logged on the account, it starts the game (League of Legends.exe). Now it can happen that "League of Legends.exe doesn´t respond and simply hangs. The programm should look for "League of Legends.exe" applications and terminate those who aren´t responding for more than 5 seconds – Lennart Menzel Mar 11 '16 at 8:47
  • Sir I think you should try batch script script.bat or script.cmd useing taskkill command in it here is an exemple taskkill /im "League of Legends.exe" /fi "STATUS eq NOT RESPONDING" – Fayssal Ozilf Mar 12 '16 at 22:39
  • the only problem is that idk how to set it wait for 5 seconds – Fayssal Ozilf Mar 12 '16 at 22:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.