Reputation: 45
Suppose that I have two jobs A and B. They both execute on different intervals which may end up overlapping. For example, if A executes every 10 seconds and B executes every 15 seconds, then every 30 seconds their execution will coincide.
I want to ensure that if their execution does end up coinciding, job A always happens first.
I'm attempting to determine a good way to set this up in Quartz.NET (2.x), but would appreciate any insight.
Upvotes: 0
Views: 1566
Reputation: 45
It turns out that you can set a priority value on Triggers so that if they have the same fire time, the Trigger with the highest priority is executed first.
See : http://www.quartz-scheduler.net/documentation/quartz-2.x/tutorial/more-about-triggers.html
Upvotes: 0
Reputation: 2581
You can use ITriggerListener
and implement the method VetoJobExecution.
More informations can be found here.
Upvotes: 1