Good old DOS batch file question
Does anyone know how to stop an application from inside a DOS Batch file. I'm starting a Java app with the scheduler and I want to end it after a certain time period.
Thanks!
Web Development
Does anyone know how to stop an application from inside a DOS Batch file. I'm starting a Java app with the scheduler and I want to end it after a certain time period.
Thanks!
by andrew
I don't know if it's possible to locate and terminate a process solely from within a batch file. You could write a small app to do this, one that gets kicked off from a batch file.
Your batch file could set an environment variable or write a filethat your app polls for, and shuts down when detected.
Why not have your app shut itself down after a certain time period?
by prt
In the Microsoft Resource Kit there's a command line utility called KILL. That utility can be called from within a batch file to kill a process based on its process id or process name.
KILL can also be passed to the scheduler so it can also be scheduled to kill your process after a certain time.
by prt
This discussion is closed to new replies.
Sort by Trending