Table of Contents

Class ExecutionHistoryEntry

Namespace
Quartz
Assembly
Quartz.dll

One execution that has finished, as the scheduler that ran it reported.

public sealed record ExecutionHistoryEntry : IEquatable<ExecutionHistoryEntry>
Inheritance
ExecutionHistoryEntry
Implements
Inherited Members

Remarks

Duration is a TimeSpan, as every other duration Quartz reports is.

Constructors

ExecutionHistoryEntry(string, string, string, string, string, string, DateTimeOffset, TimeSpan, bool, string?)

One execution that has finished, as the scheduler that ran it reported.

public ExecutionHistoryEntry(string SchedulerName, string SchedulerInstanceId, string JobGroup, string JobName, string TriggerGroup, string TriggerName, DateTimeOffset FiredAtUtc, TimeSpan Duration, bool Succeeded, string? ExceptionMessage)

Parameters

SchedulerName string

The scheduler the execution belongs to.

SchedulerInstanceId string

The node that ran it. Every node of a cluster keeps its own history of its own executions, so without this a row cannot say which machine it came from — and a store shared across the cluster cannot say it either.

JobGroup string

The group of the job that ran.

JobName string

The name of the job that ran.

TriggerGroup string

The group of the trigger that fired it.

TriggerName string

The name of the trigger that fired it.

FiredAtUtc DateTimeOffset

When the execution fired.

Duration TimeSpan

How long the job took.

Succeeded bool

Whether the run counts as a success: Result is Succeeded or Skipped. On a row written before 4.4, whether the job completed without throwing.

ExceptionMessage string

The message of what the job threw, or null when it did not throw. The scheduler's recorder writes the job's own message, not that of the wrapper the scheduler reports it in.

Remarks

Duration is a TimeSpan, as every other duration Quartz reports is.

Properties

Duration

How long the job took.

public TimeSpan Duration { get; init; }

Property Value

TimeSpan

EffectiveResult

Result, or on a row written before 4.4 what Succeeded implies: Succeeded or Failed.

public JobRunResult EffectiveResult { get; }

Property Value

JobRunResult

Remarks

What every result filter, retention tier and status is decided by.

EntryId

What names this row among the scheduler's history, and what GetExecution(string, string, CancellationToken) reads it back by; or null on a row nothing has named.

public string? EntryId { get; init; }

Property Value

string

Remarks

The recorder names every row it writes, and the shipped stores name one that arrives without, so every row they return carries one. A store written against 4.2 may return rows without, and a reader then has no way to ask for one of them alone.

ExceptionMessage

The message of what the job threw, or null when it did not throw. The scheduler's recorder writes the job's own message, not that of the wrapper the scheduler reports it in.

public string? ExceptionMessage { get; init; }

Property Value

string

FireInstanceId

The firing's FireInstanceId, which links the row to the firing's span and log scope; or null on a row written before 4.4.

public string? FireInstanceId { get; init; }

Property Value

string

Remarks

Not a key: a fire instance id is unique among the firings in flight, and may repeat after a restart.

FiredAtUtc

When the execution fired.

public DateTimeOffset FiredAtUtc { get; init; }

Property Value

DateTimeOffset

Input

The input the run was given — the string the scheduler stored under JobInput — or null when none was recorded.

public string? Input { get; init; }

Property Value

string

Remarks

Recorded only with RecordInput, because a job's input can hold secrets, and only up to MaxInputBytes. Passing it back under JobInput to TriggerJob(JobKey, JobDataMap?, CancellationToken) runs the job with what it had, which is what the dashboard's Run again does.

A listing is entitled to leave it out, as it leaves out Log, and GetExecution(string, string, CancellationToken) always carries it.

InputTooLarge

Whether the run had an input over MaxInputBytes, which was then not recorded at all.

public bool InputTooLarge { get; init; }

Property Value

bool

Remarks

Nothing rather than a cut input, because a cut payload is a different input: run again with it, a job would do something it was never asked to.

JobGroup

The group of the job that ran.

public string JobGroup { get; init; }

Property Value

string

JobName

The name of the job that ran.

public string JobName { get; init; }

Property Value

string

Log

The lines the job logged while it ran, oldest first, or null when nothing was captured.

public string? Log { get; init; }

Property Value

string

Remarks

Kept only for a scheduler that calls UseExecutionLogCapture(), bounded by ExecutionLogCaptureOptions. A listing is entitled to leave it out — the persistent store and the HTTP API do, so that a page of history does not carry every row's log — and GetExecution(string, string, CancellationToken) always carries it.

Manual

Whether the run was asked for with TriggerJob(JobKey, JobDataMap?, CancellationToken) rather than fired by a schedule.

public bool Manual { get; init; }

Property Value

bool

Remarks

Read from ManualTrigger on the firing trigger's JobDataMap. false on a row written before 4.4.

MetricsJson

What the run measured, from Metrics, as one JSON object; or null when the job reported none, or more than MaxMetricsLength characters of it.

public string? MetricsJson { get; init; }

Property Value

string

Result

What the run achieved, or null on a row written before 4.4.

public JobRunResult? Result { get; init; }

Property Value

JobRunResult?

Remarks

Read EffectiveResult, which answers for the older rows too.

RetryAttempt

Which attempt at the occurrence this execution was: 0 on the regular fire, n on the n-th retry under its RetryPolicy.

public int RetryAttempt { get; init; }

Property Value

int

Remarks

A non-positional init property, so the record's constructor is unchanged and a store written against 4.1 still compiles. 0 for every execution no policy applies to, which is the default.

RetryScheduled

Whether the trigger answered this failure with another attempt, so the occurrence was not finished when this row was written.

public bool RetryScheduled { get; init; }

Property Value

bool

Remarks

This is what tells a row that says "failed, and will be tried again" from one that says "failed, and that was the last word". A row with Succeeded false and this false is a final failure — which is what FailedFinally selects and what the dashboard offers to run again.

SchedulerInstanceId

The node that ran it. Every node of a cluster keeps its own history of its own executions, so without this a row cannot say which machine it came from — and a store shared across the cluster cannot say it either.

public string SchedulerInstanceId { get; init; }

Property Value

string

SchedulerName

The scheduler the execution belongs to.

public string SchedulerName { get; init; }

Property Value

string

Succeeded

Whether the run counts as a success: Result is Succeeded or Skipped. On a row written before 4.4, whether the job completed without throwing.

public bool Succeeded { get; init; }

Property Value

bool

Summary

The job's own one line about the run, from Summary, or null. At most MaxSummaryLength characters.

public string? Summary { get; init; }

Property Value

string

TriggerGroup

The group of the trigger that fired it.

public string TriggerGroup { get; init; }

Property Value

string

TriggerName

The name of the trigger that fired it.

public string TriggerName { get; init; }

Property Value

string