Is Trigger scheduled to fire at a specific time?

How can we know if a trigger is scheduled to fire at a specific time? i searched through all the apis but couldnt find. The closest api I found is getNextFireTime() and getFireTimeAfter(Date afterTime). My requirement is to find that if a trigger is scheduled to fire at a specific time.. If not schedule it to fire at that time.

Answers


You could use the Quartz TriggerUtils utility methods.

The method computeFireTimes(org.quartz.spi.OperableTrigger trigg, Calendar cal, int numTimes) returns a list of Dates that are the next fire times of a Trigger.

The method computeFireTimesBetween(org.quartz.spi.OperableTrigger trigg, Calendar cal, java.util.Date from, java.util.Date to) returns a list of Dates that are the next fire times of a Trigger that fall within the given date range.

I hope this helps.


Need Your Help

Binary String Regex Control Position

java regex

I want to write a regex such that it matches all binary strings of length zero or more. The requirement is that the odd position must be 1 and even position can be either 1 or 0.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.