Struct SchedulerAddOptions
- Namespace
- Quartz
- Assembly
- Quartz.dll
What to add a scheduler with, beyond its name and the recipe that configures it.
public readonly record struct SchedulerAddOptions : IEquatable<SchedulerAddOptions>
- Implements
- Inherited Members
Remarks
The two settings-shaped members are the runtime spellings of the two AddQuartz(name, …)
overloads that take settings, so a tenant described by a configuration section at startup is
described by the same section when it arrives at runtime instead.
Defaults are the conservative ones: no settings beyond what the recipe says, and the scheduler is started — which is the whole of what adding one at runtime is for. So default — which is what omitting the argument gives — is "build it from the recipe and run it".
Properties
Configuration
A configuration section describing the scheduler, as AddQuartz(name, configuration, …)
takes it.
public IConfiguration? Configuration { get; init; }
Property Value
Remarks
Either the scheduler's own section or a root section containing Schedulers:{name}; the
same resolution the registration-time overload does. Setting this and
Properties is refused rather than resolved by precedence: a section says
everything a property bag does, so one of them would be read and the other dropped without a word.
CreateWithoutStarting
Whether the scheduler is left for the application to start, rather than started as soon as it has been created.
public bool CreateWithoutStarting { get; init; }
Property Value
Remarks
This is the whole of the starting policy for a scheduler added at runtime. StartDelay and AwaitApplicationStarted do not apply: both are about the window between a host starting and its application being ready, and a scheduler added at runtime arrives long after both. WaitForJobsToComplete does apply, because it is about the host stopping, which is still ahead.
Properties
Flat quartz.* properties for the scheduler, as
AddQuartz(name, properties, …) takes them.
public IEnumerable<KeyValuePair<string, string?>>? Properties { get; init; }
Property Value
Remarks
Checked against the keys Quartz reads, so a misspelling is reported rather than ignored. Set
quartz.checkConfiguration to false to allow keys of your own.
WithoutStarting
Create the scheduler and leave starting it to the application. The name for
new SchedulerAddOptions { CreateWithoutStarting = true }.
public static SchedulerAddOptions WithoutStarting { get; }