Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a server running many JAVA application's with tomcat 6.0.18, i need to know how can i scheduele a shutdown of just 'X' application and keep other's running.

I'll appreciate your ideas


share|improve this question

Take a look at this:

or move your mouse to the "Stop" link on the Tomcat Manager Web UI, and look at the status bar you will see the URL to stop that app. You can call it with a script via wget, curl, lynx, ...

share|improve this answer
+1 for saying to use wget/curl… – Donal Fellows Jun 10 '11 at 10:13

Access Tomcat Manager via URL http://ip:8080/manager, you will see a list of running applications. And from this, you can stop any webapp which you want.

share|improve this answer
@quanta : thanks for your reply, i know that i can shutdown an apps from tomcat manager console but my request is how can i schedule it thank you again – ME-KJ May 30 '11 at 10:15
If you are running Tomcat on Linux, you can kill it by getting the PID from the port which your app is running: netstat -nlp | grep java | grep :port | awk '{ print $7 }' | awk -F "/" '{ print $1 }' – quanta May 30 '11 at 10:53
RE, my tomcat is using 4519 ports for all apps and i want just shutdown X apps not all tomcat apps thanks – ME-KJ May 30 '11 at 11:02
Did you try to kill it based on the app name? – quanta May 30 '11 at 13:00
no how can i do that? tks – ME-KJ May 30 '11 at 14:41

I use wget to stop et start applications the user in tomcat-user.xml must have manager-script roles For TOMCAT 5,6:

wget "http://<user>:<password>@<servername>:<port>/manager/stop?=/<application context>" -O - -q
wget "http://<user>:<password>@<servername>:<port>/manager/start?=/<application context>" -O - -q

Since TOMCAT 7 (7.0.62 for my installation) you have to add /text/ after manager:

wget "http://<user>:<password>@<servername>:<port>/manager/text/stop?=/<application context>" -O - -q
wget "http://<user>:<password>@<servername>:<port>/manager/text/start?=/<application context>" -O - -q

Hope it's helpful

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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