File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes schedule task Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "schedule task" Watch "schedule task" New topic

schedule task


Joined: Sep 28, 2001
Posts: 4
how can I set a schedule task at the background of an tomcat server?
The task is to execute regular checking and execution on the database and email.
Peter den Haan
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
Assuming JDK 1.3 or above, you can schedule a java.util.TimerTask from an auto-loaded initialisation servlet.
- p2

Joined: Sep 28, 2001
Posts: 4
How can I set it run at the background?
I mean I want it run when the server start.
I agree. Here's the link:
subject: schedule task
It's not a secret anymore!