Table of Contents

Class JobScheduleState

Namespace
MailFathom.Application.Jobs.Scheduling
Assembly
MailFathom.Application.dll

What one recurring dispatch has already done, which is the whole of what a schedule keeps between passes.

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

Remarks

Durable because a schedule is otherwise unable to tell a restart from an occasion. Without the occasion it last dispatched, a process coming back up would either fire every schedule again or fire none of them, and which of the two it did would depend on when it happened to come back.

ObservedFrom is what makes a schedule a when rather than a debt. A schedule this deployment has never dispatched is seeded with the instant it was first seen and dispatches nothing for it, so adding a rule at noon does not immediately fire the occasion it declared for three in the morning.

Every field is an instant or MailFathom's own identity for something. Nothing derived from a message belongs in a row an operator reads to find out why their housekeeping has not run.

Properties

CountedFrom

Reads the instant this schedule's occasions are counted from.

Id

Gets the schedule this state belongs to.

LastDispatchedJobId

Gets the job the last dispatch enqueued, or null when none is being watched.

LastOccurrenceAt

Gets the occasion last dispatched or deliberately passed over, or null while there has been none.

ObservedFrom

Gets the instant from which this schedule's occasions count, which is when it was first seen.