ScheduleRuleModule
PackageFCQRS.Workflows
Due-time calculation for a `ScheduleRule`. Every `DateTime` it takes or returns is UTC.
Summary
| Name | Signature | Synopsis |
|---|---|---|
| next | next rule anchor after | The first due time strictly after `after`. |
| MaxMissed | MaxMissed | The most due times `missed` returns under `CatchUp.All`. |
| missed | missed rule anchor lastDue now policy | The due times in `(lastDue, now]` that the policy runs, oldest first. |
| MaxInterval | MaxInterval | The longest `Every` interval: 366 days, which keeps every due time far from the largest `DateTime`. |
| validate | validate rule | Checks that a rule can produce due times: a time zone this system can read, at least one day that exists, and an interval from one second to `MaxInterval` (366 days). |
The first due time strictly after `after`. `anchor` is the schedule's creation or last change
time, which `Every` counts from. All times are UTC.
Parameters
| Name | Type | Description |
|---|---|---|
| rule | ScheduleRule | |
| anchor | DateTime | |
| after | DateTime |
Returns
DateTime
The due times in `(lastDue, now]` that the policy runs, oldest first. All times are UTC.
`CatchUp.All` returns at most the `MaxMissed` (1000) most recent of them. `CatchUp.Latest`
returns at most one.
Parameters
| Name | Type | Description |
|---|---|---|
| rule | ScheduleRule | |
| anchor | DateTime | |
| lastDue | DateTime | |
| now | DateTime | |
| policy | CatchUp |
Returns
DateTime list
The longest `Every` interval: 366 days, which keeps every due time far from the largest
`DateTime`.
Returns
TimeSpan
Checks that a rule can produce due times: a time zone this system can read, at least one day
that exists, and an interval from one second to `MaxInterval` (366 days). Returns an error,
never an exception, whatever the rule holds.
Parameters
| Name | Type | Description |
|---|---|---|
| rule | ScheduleRule |
Returns
Result<unit, string>