I'm trying to find out how to limit a program execution time within a Windows batch file. Is there something like Unix timeout command?
Please advise.
To limit the time a program has to run you could do something like this
start yourprogram.exe
timeout /t 10
taskkill /im yourprogram.exe /f
That starts yourprogram.exe, waits 10 seconds, then kills the program.
I just installed Cygwin and use unix-style timeout command from the distribution.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With