views:

27

answers:

2

Hello internet,

I have been looking for the past two hours for a script to reload my web app.

  • I'm using Tomcat on a windows server 2003.
  • I know that there is a link to reload your web app, but i'm wondering if i can automate the process to reload my web app once every 8 hours.

I would really appreciate if you could give me hint or two :)


Thank you in advance

+1  A: 

You should be able to use something like a scheduled task in Windows Task Scheduler to do this. See this tutorial here: http://www.iopus.com/guides/winscheduler.htm

It looks like tomcat is installed as windows service so you can create a batch (.bat) file to stop and start the service. It should look something like this:

net stop tomcat
net start tomcat

Just setup the scheduled task to run this batch file every 8 hours.

Lummo
The service name 'tomcat' may have the version number in it such as 'tomcat6' so you'll need to check that:http://tomcat.apache.org/tomcat-6.0-doc/windows-service-howto.html
Lummo
i am very gratefull for your answers. Thank you :)
Clement
A: 

there are two original batch to start tomcat, i just plan them to execute every 8 hours. As easy as that.

Clement