[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Get triggers scheduled for execution on a given date  XML
Forum Index -> Quartz
Author Message
cwalzl

neo

Joined: 12/01/2009 13:50:31
Messages: 4
Offline

Does anyone know if Quartz has any utility classes for retrieving a list of triggers that are scheduled to fire on a given date, or a range of dates?

If not, what do you think the best way to go about doing this is?

Any help would be greatly appreciated!

Thanks,
Chris
jhouse

seraphim
[Avatar]
Joined: 11/06/2009 15:29:56
Messages: 1703
Offline

This is computationally intensive (more so than may be evident at your first thought) and there are many different possible desired semantics of such, and hence quartz does not provide a high-level api for doing this.


Your will basically need to iterate over every trigger in the scheduler, and determine whether it will fire within your time range. There are some helper methods on the TriggerUtils class that will compute future fire times of a trigger (don't just look at the trigger's nextFireTime - because the trigger may repeat a number of times... one or more of which may occur within your time range of interest, or perhaps the repeat interval may cause the trigger's firings to completely skip over your time range of interest).
cwalzl

neo

Joined: 12/01/2009 13:50:31
Messages: 4
Offline

Thanks for the info!
 
Forum Index -> Quartz
Go to:   
Powered by JForum 2.1.7 © JForum Team