Class ScheduledJob
- Namespace
- MailFathom.Application.Jobs.Scheduling
- Assembly
- MailFathom.Application.dll
One execution a deployment wants repeated, and the occasions it wants it on.
public sealed record ScheduledJob : IEquatable<ScheduledJob>
- Inheritance
-
ScheduledJob
- Implements
- Inherited Members
Remarks
The payload is fixed for the life of the declaration rather than composed per occasion, because what a recurring dispatch repeats is one piece of work: the occasion decides when, and the identity of the execution is the schedule plus that instant. A payload that varied per occasion would be a different job type asking for a scheduler rather than a schedule.
Declared rather than stored, whichever source declared it. A deployment's configuration is one source of schedules and the declarations an owner made are another, so what exists is whatever the sources answer with on the pass that asks. The only durable state a schedule itself has is the occasion it last dispatched — which is state rather than settings, and lives where every other piece of state does.
Constructors
- ScheduledJob(JobScheduleId, IJobPayload, JobRecurrence, MailAccountId?)
One execution a deployment wants repeated, and the occasions it wants it on.
Properties
- Id
The identity the schedule's durable state is keyed by.
- Payload
The references the repeated work is described by, which also names its job type.
- Recurrence
The occasions the work is dispatched on.