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

Scheduling multiple tasks dynamically

Chandrika Ratnam

Joined: Dec 07, 2005
Posts: 5
Hi !
I'm working on schedulers.
My problem is I have a list of dynamically generated reports.For every report that is generated , a corresponding scheduler must run periodically say , every day at certain time. The time at which the scheduler must run will be inputted by the user for each report.

I was able to run the scheduler perfectly if there was just one report. But whenever I have more than 1 report , I'm unable to handle.

Please suggest any idea or solution for this.

My scheduler will start when my application server is started.
I'm using a class that extends TimerTask class.

Thanks in advance,
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
This is not really a Struts question. You may need one report generator task that runs every so often (maybe every 5 minutes, or 30 minutes depending on the needed granularity). This generator would poll the database to see if there were any reports to generate and if so would generate them. Some app servers have built in scheduling features. Quartz is a popular open source job scheduler (

- Brent
I agree. Here's the link:
subject: Scheduling multiple tasks dynamically
It's not a secret anymore!