Table of Contents

Class TriggerQuery

Namespace
Quartz
Assembly
Quartz.dll

Selects triggers, as TriggerHeaders. The filters combine with AND.

public sealed record TriggerQuery : PagedQuery, IEquatable<PagedQuery>, IEquatable<TriggerQuery>
Inheritance
TriggerQuery
Implements
Inherited Members

Properties

CalendarName

Limits the result to triggers that reference the named calendar.

public string? CalendarName { get; init; }

Property Value

string

Group

Limits the result to triggers whose group matches. Null matches every group.

public GroupMatcher<TriggerKey>? Group { get; init; }

Property Value

GroupMatcher<TriggerKey>

Job

Limits the result to the triggers of one job.

public JobKey? Job { get; init; }

Property Value

JobKey

Name

Limits the result to triggers whose name matches. Null matches every name.

public NameMatcher<TriggerKey>? Name { get; init; }

Property Value

NameMatcher<TriggerKey>

NextFireTimeBefore

Limits the result to triggers whose next fire time is strictly before this instant. Null, the default, matches every trigger whatever it is due to do.

public DateTimeOffset? NextFireTimeBefore { get; init; }

Property Value

DateTimeOffset?

Remarks

A trigger with no next fire time never matches, because "has no next firing" is not "is due before then" — that set is Complete, and asking for it by state is how to list it.

An instant in the past makes this the overdue set: combined with State of Normal it is every trigger that should already have fired and has not, which is what QuartzHealthCheckOptions.StaleFiringTolerance asks a scheduler in order to notice that it has stopped firing. Combined with IncludeTotalCount and a Take of zero it counts them instead.

A filter rather than an ordering, which is also why PagedQuery's single order still holds: every store and the HTTP wire agree on group-then-name, no dialect agrees on where a null sorts, and the index the ADO store carries over the state and next fire time (IDX_QRTZ_T_NFT_ST) answers this predicate with a seek.

State

Limits the result to triggers in the given state — for example Error to list or count failed triggers.

public TriggerState? State { get; init; }

Property Value

TriggerState?