Table of Contents

Struct AddTriggerOptions

Namespace
Quartz
Assembly
Quartz.dll

How a trigger is stored on its own, without the job it fires.

public readonly record struct AddTriggerOptions : IEquatable<AddTriggerOptions>
Implements
Inherited Members

Remarks

Defaults are the conservative ones: nothing is replaced, nothing is paused. So default — which is what omitting the argument gives — is "store it, replace nothing", and there is no third state between "not given" and "all defaults" for an implementer to have to guess about.

This is a store-level type. IScheduler has no AddTrigger: a trigger reaches a scheduler through ScheduleJob(ITrigger, ScheduleJobOptions, CancellationToken), which is the same operation named for what it accomplishes. AddTrigger(IOperableTrigger, AddTriggerOptions, CancellationToken) is the storage half of it, and this is the storage half's options.

Properties

PauseReason

Why the trigger is stored paused, recorded as Reason. Setting it stores it paused. Blank reads as unset; longer than MaxReasonLength is cut.

public string? PauseReason { get; init; }

Property Value

string

PauseRequestedBy

Who asked for the trigger to be stored paused, recorded as RequestedBy. Setting it stores it paused. Blank reads as unset; longer than MaxRequestedByLength is cut.

public string? PauseRequestedBy { get; init; }

Property Value

string

Paused

Whether the trigger is stored paused, in the same operation that stores it. Reads true when PauseReason or PauseRequestedBy is set.

public bool Paused { get; init; }

Property Value

bool

Remarks

A store honours it when it says SupportsStoringPaused: the trigger is written paused — paused-blocked when its job disallows concurrent execution and is running — with the pause's record, and is never acquirable in between. The record is the trigger's own, so it is what GetTriggerPause(TriggerKey, CancellationToken) answers over a paused group's, and it replaces the record of a trigger stored over. A continuation is stored awaiting its parent whatever this says.

The same as Paused, which ScheduleJobs(IReadOnlyDictionary<IJobDetail, IReadOnlyCollection<IOperableTrigger>>, ScheduleJobOptions, CancellationToken) takes.

Replace

Whether an already stored trigger with the same key is over-written. When false, storing a trigger whose key already exists throws ObjectAlreadyExistsException.

public bool Replace { get; init; }

Property Value

bool

Replacing

Over-write an already stored trigger with the same key. The name for new AddTriggerOptions { Replace = true }, which is what nearly every call that passes these options at all is saying.

public static AddTriggerOptions Replacing { get; }

Property Value

AddTriggerOptions

See Also