How to implement using a shell or command line script in Windows that checks for the status of some process, ie. Tomcat server and if it exists, it kills it?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
On window you can make a
.batfile with this content:replace program_name with the program you want to kill. Here’s a decent article on
TASKKILLOr if it’s just tomcat you can run
shutdown.bat… ifTOMCAT_HOMEisn’t set just run it from the tomcat home directory.