This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes How to create a Listener in Quartz Job Schedular Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Reply Bookmark "How to create a Listener in Quartz Job Schedular" Watch "How to create a Listener in Quartz Job Schedular" New topic
Author

How to create a Listener in Quartz Job Schedular

Ankur Sharma
Ranch Hand

Joined: Dec 27, 2005
Posts: 1234
Hi,

I have created a Job for Quartz Scheduler, which is in turn reading from a queue and writing into file system.

Now we have a restriction that we should keep writing until queue message count reaches 5000 or 2hrs have been passed.

For queue message count I could do this restriction in that job class itself, but how could I manage time restriction from Scheduler. I know, I can handle this restriction in actual queue reading class. But just for sake of maintainability we want to control it through Quartz Scheduler.

Any help would be appreciated.

Thanks
Ankur


The Best way to predict your future is to create it
Ankur Sharma
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19216

I think you'll have a bit more success in the Other Open Source Projects forum.


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3268

Hi Ankur,

Have you thought about having a 2nd schedule job which stops the first (after 2 hours)?


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: How to create a Listener in Quartz Job Schedular
 
Similar Threads
How to create a timeframe from Quartz Job Scheduler
Quartz/Timer question with ejb3
Cyclic method execution
Insight to Quartz Scheduler
Design a servlet that gets values from a file and update itself as soon as file is modified