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

Locating the getter and setter access modifiers in the EdmItemCollection of Entity Framework

c# xml linq entity-framework linq-to-entities

I've been creating a nice T4 template for a repository pattern for my entities. Instead of manually parsing the xml in the edmx file I use the EdmItemCollection to create a object graph presentatio...

Joining tables in sql server?

sql sql-server

In SQL Server, I am joining three tables like below.

WPF data binding to a data model as an application resource

wpf xaml data-binding

I have have a problem with data binding. I have defined a application resource in XAML like this:

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.