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
InterruptRequestedUtc
When an interrupt of this firing was asked for from another node, or null when none is pending.
public DateTimeOffset? InterruptRequestedUtc { get; init; }
Property Value
Remarks
The request Interrupt(JobKey, CancellationToken) and
InterruptFireInstance(string, CancellationToken) record for a firing another node of a clustered
store runs (#4071), read from QRTZ_FIRED_TRIGGERS.INTERRUPT_REQUESTED_TIME. The node running
the firing acts on it after its next check-in; the request stays until the firing ends, so a firing
listed with one has been asked to stop and may not have stopped yet.
Always null on a store that records no requests, the in-memory one included,
where an interrupt cancels the firing at once and nothing is left pending. A non-positional
init property, as Progress is.
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
Progress
How far the running job said it had got, from 0 to 100, or
null when it has not said.
public int? Progress { get; init; }
Property Value
- int?
Remarks
What the job last passed to ReportProgress(int, string?), as the store last recorded it: the scheduler writes it at most once a second per firing, so it can trail the job by up to that. Always null while the firing is only Acquired, on a store that keeps no progress, and on a firing a 4.2 node is running.
A non-positional init property, as ProgressMessage is, so the record's
constructor is unchanged.
ProgressMessage
What the running job said beside its Progress, at most MaxMessageLength characters, or null when it said nothing.
public string? ProgressMessage { 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; }