wood burning stoves 2.0*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Scheduling multiple tasks dynamically    " Watch "Scheduling multiple tasks dynamically    " New topic
Author

Scheduling multiple tasks dynamically

Chandrika Ratnam
Greenhorn

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,
Chandrika
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 (www.opensymphony.com/quartz/).

- Brent
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Scheduling multiple tasks dynamically
 
Similar Threads
dynamic jasper report
Runtime.exec()
How to save a file inside an application context?
How to auto execute a session bean’s method on ear deployment?
How can a non-servlet find application root and best way to access a servlets data?