Table of Contents

Enum SchedulerStatus

Namespace
Quartz
Assembly
Quartz.dll

Where a scheduler is in its lifecycle. This is Status, and it is the whole of a scheduler's lifecycle state: one value to read and one value to match on, rather than several booleans a reader would have to combine in the right order.

public enum SchedulerStatus

Fields

Created = 1

The scheduler has been built but never started, so it fires nothing yet.

Distinct from Standby, which a scheduler reaches by being started and then stood down: both fire nothing, but only one of them has ever run, and only one has a RunningSince. Standing a never-started scheduler down leaves it here, since it already fires nothing and "never started" is the more precise answer.

Running = 2

The scheduler has been started and is firing triggers.

Shutdown = 5

The scheduler has been shut down and cannot be restarted. Its plugins, job store and thread pool are down with it.

ShuttingDown = 4

Shutdown(bool, CancellationToken) has been called and is running. The scheduler no longer fires triggers and no longer accepts work, and it can neither be restarted nor stood down - the only state left is Shutdown.

Standby = 3

The scheduler is in standby: it is alive, but fires nothing until it is started again.

Unknown = 0

The scheduler's state could not be determined - a remote scheduler that did not answer, for instance. It is not a state a scheduler is ever in, only one a reader can be left with.

Remarks

The members are declared in lifecycle order, and a scheduler moves through them one way: Created to Running, back and forth between Running and Standby, then ShuttingDown and finally Shutdown. Only the middle pair is reversible; Shutdown is terminal.

The member names are a wire contract: the HTTP API returns this enum as its name, and still accepts the numeric form. Names are never changed, and new members are appended.