• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

event firing in tomcat

 
Ranch Hand
Posts: 156
Hibernate Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got small problem with tomcat
I want an application such that for every one hour a java program shoud be executed which is placed in tomcat.
Here the tomcat should check for time always, whenever the hour changes it shoud execute java program
How can I do that in the server, can any body help in this?
thanks in advance
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is typically done by having a servlet that is marked to be init-ed on startup and in the init() method creating a Runnable object that wakes up at the desired time. I like to make such a servlet to have a doGet that reports on the status of the Runnable object and such things as total memory in use, etc. - that way you get two functions in one servlet.
Bill
 
santhoshkumar samala
Ranch Hand
Posts: 156
Hibernate Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the solution is fine
but the problem is where the servlet should be placed?i.e, in which folder
of tomcat
 
reply
    Bookmark Topic Watch Topic
  • New Topic