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

Run Nightly Tasks

Patrick McDonogh
Ranch Hand

Joined: Oct 13, 2005
Posts: 89
Hi there everyone,

I have a struts web application and have some actions which i want to run every night for instance, every night run the action that searches the database for users who have been marked as deleted and remove them from the database.

I was wondering what the best(most performant) way is to run these actions that need to run at certain times of the day, month, year, etc. So i guess what i am asking is what the best was is to run tasks that need to run every day, year, etc at a certain time in Java.

Thanks for any help given.

John Melton
Ranch Hand

Joined: Aug 17, 2004
Posts: 49
There are many different ways to do this. The simplest would probably be a command line shell script/batch job on the server to call the servlet. However if you want something more robust, you might want to check out the quartz package for scheduling jobs

I agree. Here's the link:
subject: Run Nightly Tasks
It's not a secret anymore!