Class TriggerDetailsUpdate
- Namespace
- Quartz
- Assembly
- Quartz.dll
Specifies which trigger properties to update without rescheduling. Only properties explicitly set via the builder methods will be changed.
public sealed class TriggerDetailsUpdate
- Inheritance
-
TriggerDetailsUpdate
- Inherited Members
Remarks
Most properties here are pure metadata, but the calendar name and the misfire instruction can affect firing behavior. Changing them via this API does not recompute fire times — the new values take effect starting from the next scheduling evaluation.
The misfire instruction is set six ways, and all six earn their place. The five typed overloads
of WithMisfireInstruction are one per schedule family, and each is load-bearing: the same
number means a different policy in each family, so naming the family is what lets the store
reject an update aimed at a trigger of another one rather than silently apply the wrong policy.
WithMisfireInstructionCode(int) is the sixth, and it is the only way to set a code on a
trigger outside the five built-in families — a custom ITrigger belongs to none of
them, so every typed overload would be rejected for it — as well as the way to pass a code that
arrived as a number.
Methods
WithCalendarName(string?)
Set the trigger's associated calendar name, or null to disassociate.
public TriggerDetailsUpdate WithCalendarName(string? calendarName)
Parameters
calendarNamestring
Returns
Remarks
A blank name disassociates as well. The store checks that a non-null name exists before it assigns it, so without this a blank name would be rejected as a missing calendar rather than clearing the association.
WithDescription(string?)
Set the trigger's description.
public TriggerDetailsUpdate WithDescription(string? description)
Parameters
descriptionstring
Returns
WithExecutionGroup(string?)
Set the execution group whose thread limit this trigger's job counts against, or null to remove it from every group.
public TriggerDetailsUpdate WithExecutionGroup(string? executionGroup)
Parameters
executionGroupstring
Returns
Remarks
The new group applies from the next acquisition cycle; a job already running keeps counting against the group it was acquired under.
- See Also
WithJobDataMap(JobDataMap)
Set the trigger's JobDataMap.
public TriggerDetailsUpdate WithJobDataMap(JobDataMap jobDataMap)
Parameters
jobDataMapJobDataMap
Returns
WithMisfireInstruction(CalendarIntervalTriggerMisfireInstruction)
Set the misfire instruction of a calendar-interval trigger.
public TriggerDetailsUpdate WithMisfireInstruction(CalendarIntervalTriggerMisfireInstruction misfireInstruction)
Parameters
misfireInstructionCalendarIntervalTriggerMisfireInstruction
Returns
Remarks
The update is rejected if the trigger the key resolves to is not an ICalendarIntervalTrigger.
WithMisfireInstruction(CronTriggerMisfireInstruction)
Set the misfire instruction of a cron trigger.
public TriggerDetailsUpdate WithMisfireInstruction(CronTriggerMisfireInstruction misfireInstruction)
Parameters
misfireInstructionCronTriggerMisfireInstruction
Returns
Remarks
The update is rejected if the trigger the key resolves to is not an ICronTrigger.
WithMisfireInstruction(DailyTimeIntervalTriggerMisfireInstruction)
Set the misfire instruction of a daily-time-interval trigger.
public TriggerDetailsUpdate WithMisfireInstruction(DailyTimeIntervalTriggerMisfireInstruction misfireInstruction)
Parameters
misfireInstructionDailyTimeIntervalTriggerMisfireInstruction
Returns
Remarks
The update is rejected if the trigger the key resolves to is not an IDailyTimeIntervalTrigger.
WithMisfireInstruction(RecurrenceTriggerMisfireInstruction)
Set the misfire instruction of a recurrence trigger.
public TriggerDetailsUpdate WithMisfireInstruction(RecurrenceTriggerMisfireInstruction misfireInstruction)
Parameters
misfireInstructionRecurrenceTriggerMisfireInstruction
Returns
Remarks
The update is rejected if the trigger the key resolves to is not an IRecurrenceTrigger.
WithMisfireInstruction(SimpleTriggerMisfireInstruction)
Set the misfire instruction of a simple trigger.
public TriggerDetailsUpdate WithMisfireInstruction(SimpleTriggerMisfireInstruction misfireInstruction)
Parameters
misfireInstructionSimpleTriggerMisfireInstruction
Returns
Remarks
The update is rejected if the trigger the key resolves to is not a ISimpleTrigger.
WithMisfireInstructionCode(int)
Set the trigger's misfire instruction as the raw code a trigger stores, for callers that have a number rather than a family — a value read off the wire, from configuration, or from MisfireInstructionCode.
public TriggerDetailsUpdate WithMisfireInstructionCode(int misfireInstructionCode)
Parameters
misfireInstructionCodeint
Returns
Remarks
Prefer the family-typed WithMisfireInstruction overloads: the same number means a
different policy in each family, and only the typed form lets the store tell you that the
key resolved to a trigger of another one. This one names no family and so skips that check
entirely, which is also what makes it the only way to set a misfire instruction on a trigger
implementation of your own: such a trigger is in none of the five families, so every typed
overload would be rejected for it.
WithPreferredNode(PreferredNode)
Set the trigger's preferred node for cluster node affinity.
public TriggerDetailsUpdate WithPreferredNode(PreferredNode preferredNode)
Parameters
preferredNodePreferredNodeThe pin: None to clear, Auto for auto-pin on first fire, or For(string) to name a node.
Returns
- See Also
WithPriority(int)
Set the trigger's priority.
public TriggerDetailsUpdate WithPriority(int priority)
Parameters
priorityint
Returns
WithRetryPolicy(RetryPolicy?)
Set how the scheduler re-fires the trigger when its job fails, or null to stop retrying it.
public TriggerDetailsUpdate WithRetryPolicy(RetryPolicy? retryPolicy)
Parameters
retryPolicyRetryPolicythe retry policy, or null for no retries
Returns
Remarks
The policy is configuration and is the only half of the retry state an update touches. How many times the occurrence in flight has already been retried is the scheduler's to advance and clear, so there is deliberately no way to set it here: doing so would either grant a running job extra attempts or take away ones it has not used.
A new policy applies from the next failure. An occurrence already waiting on a retry keeps the schedule it was given.
- See Also