Table of Contents

Class TriggeredJobCompleteContext

Namespace
Quartz.Extensibility
Assembly
Quartz.dll

Everything a job store is told about a firing that has just finished.

public sealed class TriggeredJobCompleteContext
Inheritance
TriggeredJobCompleteContext
Inherited Members

Remarks

A context object rather than a parameter list, so that the next thing a completion has to carry is a property rather than a new overload: Outcome and Exception were the first two, and neither had anywhere to go on TriggeredJobComplete(IOperableTrigger, IJobDetail, SchedulerInstruction, CancellationToken).

The three required members are exactly what that method took. Outcome defaults to NotExecuted, which settles nothing — so a caller that knows only the instruction, and a store reached through the compatibility path, behave as they did before continuations existed.

Properties

Exception

The exception the firing ended with, when it ended with one, and null otherwise.

public Exception? Exception { get; init; }

Property Value

Exception

Remarks

Present for a store that records execution history; the settlement of continuations reads Outcome alone, because "why it failed" is not something a schedule can branch on.

Instruction

What the trigger asked the scheduler to do about itself once the firing was over.

public required SchedulerInstruction Instruction { get; init; }

Property Value

SchedulerInstruction

Remarks

This is what says whether the occurrence is finished, which Outcome does not: RetryTrigger is a failed firing the trigger has an attempt left for, and a store skips settling its continuations on that instruction rather than on the outcome — which is Failed either way.

JobDetail

The job that was fired. Its JobDataMap is the one the execution leaves behind, which is what a store persisting job data writes.

public required IJobDetail JobDetail { get; init; }

Property Value

IJobDetail

Outcome

How the firing ended, which is what the job did rather than what the schedule makes of it. Defaults to NotExecuted: an occurrence that did not happen settles no continuation.

public ExecutionOutcome Outcome { get; init; }

Property Value

ExecutionOutcome

Trigger

The trigger whose firing completed, as the firing left it — its next fire time, its retry attempt and its fire instance id are the ones the store writes.

public required IOperableTrigger Trigger { get; init; }

Property Value

IOperableTrigger

See Also