How can I set a time-limit on a batch file?
Posted
by
drknexus
on Super User
See other posts from Super User
or by drknexus
Published on 2012-06-27T07:26:10Z
Indexed on
2012/06/27
21:20 UTC
Read the original article
Hit count: 317
I have a batch file that calls an external program that periodically hangs. What I would like to do is set a time limit on the batch file / CMD prompt such that it automatically closes after a certain period of time. One catch is that the external program that hangs may have one or more instances running at a given time, and I only want the batch file hitting its time limit to close the instance of the program triggered by the batch. How can I accomplish this? Ideally a solution would work on Windows XP, Vista, and 7.
© Super User or respective owner