I want to setup an update process for an application running on Tomcat. The server which hosts tomcat is only open during working hours (it is an intraner application for a small company). I was thinking that I could upload the new war to the server and set up "something" to run on the next server boot. This something could be a bat file that will be executed on server start up but before the start up of the Tomcat service and it will delete the old war and its exploded folder. When I update manually the war I also delete the work folder of Tomcat (just to be sure). I know about hot deployment but I do not consider it an option since I am not very sure for the implications it might have on the users current working sessions.
Is there a way to run such a bat file before Tomcat start up or an alternative way to do this update? Tomcat version isn't an issue. Now is running Tomcat 6 but I can upgrade to version 7 if needed.