Class FireInstance
- Namespace
- Quartz
- Assembly
- Quartz.dll
One firing of a trigger: reserved by a scheduler node, or running on it. The listing projection behind QueryFireInstances(FireInstanceQuery, CancellationToken).
public sealed record FireInstance : IEquatable<FireInstance>
- Inheritance
-
FireInstance
- Implements
- Inherited Members
Remarks
A fire instance is not a job execution context. It carries what a store can answer about a firing from anywhere in a cluster — keys, times, which node — and nothing that lives only in the process running the job: no job instance, no merged job data, no result, no cancellation handle. Code that needs those is looking at an execution it hosts itself, and reaches them through an IJobListener holding the contexts.
The store-side sibling is FiredTriggerRecord, which is one FIRED_TRIGGERS row in full, for the ADO.NET store's recovery passes. This one is the store-neutral projection every job store can produce.
Constructors
FireInstance(string, TriggerKey, JobKey?, string, FireInstanceState, DateTimeOffset, DateTimeOffset?, string?)
One firing of a trigger: reserved by a scheduler node, or running on it. The listing projection behind QueryFireInstances(FireInstanceQuery, CancellationToken).
public FireInstance(string FireInstanceId, TriggerKey TriggerKey, JobKey? JobKey, string SchedulerInstanceId, FireInstanceState State, DateTimeOffset FireTimeUtc, DateTimeOffset? ScheduledFireTimeUtc, string? ExecutionGroup)
Parameters
FireInstanceIdstringIdentifies this firing, and only this one: a trigger that fires again gets a new value. This is the value FireInstanceId reports and InterruptFireInstance(string, CancellationToken) takes.
TriggerKeyTriggerKeyThe trigger that fired.
JobKeyJobKeyThe job being run, or null while the firing is merely Acquired — the job is not loaded until the firing starts.
SchedulerInstanceIdstringThe instance id of the scheduler node that reserved the firing or is running it. Matches SchedulerInstanceId on that node.
StateFireInstanceStateWhether the firing is reserved or running.
FireTimeUtcDateTimeOffsetWhen the firing was recorded by the node that owns it: the reservation time while Acquired, the execution start once Executing. Elapsed time is therefore
observerNow - FireTimeUtc— a subtraction that mixes the observer's clock with the firing node's, so it carries any clock skew between them and can come out negative; clamp it at zero.ScheduledFireTimeUtcDateTimeOffset?The fire time the schedule called for, as the owning node recorded it. After a misfire this is the rescheduled time rather than the originally scheduled one, so it can differ from ScheduledFireTimeUtc and
FireTimeUtc - ScheduledFireTimeUtcis not misfire lateness.ExecutionGroupstringThe execution group the trigger carried when it fired, if any. Rows written by a 4.0 preview before this column was populated report null.
Remarks
A fire instance is not a job execution context. It carries what a store can answer about a firing from anywhere in a cluster — keys, times, which node — and nothing that lives only in the process running the job: no job instance, no merged job data, no result, no cancellation handle. Code that needs those is looking at an execution it hosts itself, and reaches them through an IJobListener holding the contexts.
The store-side sibling is FiredTriggerRecord, which is one FIRED_TRIGGERS row in full, for the ADO.NET store's recovery passes. This one is the store-neutral projection every job store can produce.
Properties
ExecutionGroup
The execution group the trigger carried when it fired, if any. Rows written by a 4.0 preview before this column was populated report null.
public string? ExecutionGroup { get; init; }
Property Value
FireInstanceId
Identifies this firing, and only this one: a trigger that fires again gets a new value. This is the value FireInstanceId reports and InterruptFireInstance(string, CancellationToken) takes.
public string FireInstanceId { get; init; }
Property Value
FireTimeUtc
When the firing was recorded by the node that owns it: the reservation
time while Acquired, the execution start once
Executing. Elapsed time is therefore
observerNow - FireTimeUtc — a subtraction that mixes the observer's clock with the firing
node's, so it carries any clock skew between them and can come out negative; clamp it at zero.
public DateTimeOffset FireTimeUtc { get; init; }
Property Value
JobKey
The job being run, or null while the firing is merely Acquired — the job is not loaded until the firing starts.
public JobKey? JobKey { get; init; }
Property Value
ScheduledFireTimeUtc
The fire time the schedule called for, as the owning node
recorded it. After a misfire this is the rescheduled time rather than the originally
scheduled one, so it can differ from ScheduledFireTimeUtc and
FireTimeUtc - ScheduledFireTimeUtc is not misfire lateness.
public DateTimeOffset? ScheduledFireTimeUtc { get; init; }
Property Value
SchedulerInstanceId
The instance id of the scheduler node that reserved the firing or is running it. Matches SchedulerInstanceId on that node.
public string SchedulerInstanceId { get; init; }
Property Value
State
Whether the firing is reserved or running.
public FireInstanceState State { get; init; }
Property Value
TriggerKey
The trigger that fired.
public TriggerKey TriggerKey { get; init; }