Table of Contents

Class SchedulerRegistration

Namespace
Quartz
Assembly
Quartz.dll

One scheduler a container knows about, as reported by QuerySchedulers(CancellationToken).

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

Constructors

SchedulerRegistration(string, SchedulerOrigin, SchedulerStatus?)

One scheduler a container knows about, as reported by QuerySchedulers(CancellationToken).

public SchedulerRegistration(string Name, SchedulerOrigin Origin, SchedulerStatus? Status)

Parameters

Name string

The scheduler's name, spelled as it was registered. For a named registration this is the name AddQuartz(name, …) was given, which is also the service key and the options name; for the default scheduler it is its configured InstanceName.

Origin SchedulerOrigin

Where the scheduler came from.

Status SchedulerStatus?

What state the scheduler is in, or null when no scheduler exists under this name. Null is the answer this query exists to give: the registration is there, nothing has been built from it, and asking did not build it.

A scheduler that has been shut down also reads as null rather than as Shutdown, because ISchedulerRepository drops a shut-down scheduler as soon as a read notices it. So null means "no live scheduler under this name" — for a registration, either not yet or not any more. The two are not worth telling apart here: a shut-down scheduler cannot be created again within the same container, so neither is a name you can get a working scheduler out of.

Properties

IsCreated

Whether a scheduler exists under this name. A registration nothing has resolved yet reports false; Status says what state a scheduler that does exist is in.

public bool IsCreated { get; }

Property Value

bool

Name

The scheduler's name, spelled as it was registered. For a named registration this is the name AddQuartz(name, …) was given, which is also the service key and the options name; for the default scheduler it is its configured InstanceName.

public string Name { get; init; }

Property Value

string

Origin

Where the scheduler came from.

public SchedulerOrigin Origin { get; init; }

Property Value

SchedulerOrigin

Status

What state the scheduler is in, or null when no scheduler exists under this name. Null is the answer this query exists to give: the registration is there, nothing has been built from it, and asking did not build it.

A scheduler that has been shut down also reads as null rather than as Shutdown, because ISchedulerRepository drops a shut-down scheduler as soon as a read notices it. So null means "no live scheduler under this name" — for a registration, either not yet or not any more. The two are not worth telling apart here: a shut-down scheduler cannot be created again within the same container, so neither is a name you can get a working scheduler out of.

public SchedulerStatus? Status { get; init; }

Property Value

SchedulerStatus?