Reputation: 169
I am using Tomcat with the Spring framework. I want to have a class called by the server every 30 minutes. Is there a good way to do this in Servlet, Spring, or Struts?
Upvotes: 1
Views: 1235
Reputation: 1265
You could create a new Thread
on container startup that sleeps for 30 minutes and then performs your action. See here for information about context listeners.
Upvotes: -2
Reputation: 4220
Try this:
http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/scheduling.html
Upvotes: 3