Class RequiredJobOptions
- Namespace
- Quartz
- Assembly
- Quartz.dll
One job the Quartz health check requires to have succeeded recently: an entry of RequiredJobs.
public sealed class RequiredJobOptions
- Inheritance
-
RequiredJobOptions
- Inherited Members
Remarks
The job is named by Name and Group rather than by a JobKey,
so a configuration section binds onto it: { "Name": "nightly-report", "Group": "reports",
"SucceededWithin": "1.02:00:00" }. In code, RequireSuccessWithin(JobKey, TimeSpan, HealthStatus)
adds one.
The requirement is met while the job's LastSucceededAtUtc is within SucceededWithin of now, on the scheduler's clock. A skipped run counts as a success. A job with no recorded success is judged from the first time the check evaluated it.
Properties
Group
The job's group: DefaultGroup unless set.
public string Group { get; set; }
Property Value
Name
The job's name. Required.
public string Name { get; set; }
Property Value
Status
What the check reports while the requirement is not met: Degraded unless set. Unhealthy is for a job that must never be late; Healthy is refused.
public HealthStatus Status { get; set; }
Property Value
SucceededWithin
How long ago the job's last success may have fired. Must be positive.
public TimeSpan SucceededWithin { get; set; }
Property Value
Remarks
Leave room for the job's own schedule, its run time and a retry: a nightly job wants a little over a
day, 1.02:00:00 say.