›
byrcsc/laravel-checklist · 1.x
Schedules create at most one due checklist per run and advance in their own timezone.
A schedule turns one template into recurring checklist instances. It is an ordinary Eloquent model that points at the template, not at one frozen version.
| Frequency | Supporting field | Behavior |
|---|---|---|
Daily | none | repeats each local day |
Weekly | day_of_week | repeats on Carbon weekday 0 to 6 |
Monthly | day_of_month | repeats on day 1 to 31 |
EveryNDays | n_days | repeats from the previous occurrence |
next_due_at is stored in UTC. Calculation moves into the schedule's
timezone, keeps its local time of day, and converts the next occurrence back
to UTC.
When a weekly or monthly schedule omits its day field, saving derives it from
next_due_at. A monthly day that does not exist is clamped to the month's last
day, then returns to the requested day in a longer month.
When a schedule becomes due, the generator resolves
$schedule->template->currentVersion(). Future occurrences therefore use a
newly published version while existing checklists remain pinned to their own
versions.
A due schedule whose template has no published version is left in place and reported as skipped. Publishing later allows the same occurrence to run.
The generator creates at most one catch-up checklist, however many occurrences
were missed. It advances next_due_at until it lies after the current time.
For every-N-days schedules, the phase is counted from the due occurrence, not from the time the command happened to run. A delayed command does not shift the future cadence.
AlwaysCreate creates the next checklist even when a previous one is pending
or in progress.
SkipWhileOpen skips creation while the same schedule has open work. The
schedule still advances, so skipped occurrences do not build a backlog.
Generation claims each occurrence with a conditional database update. Two command processes cannot create the same occurrence.
Every checklist with due_at, including one created manually, is eligible.
Open work fires ChecklistDueSoon inside the configured lead window and
ChecklistOverdue after the due date.
Each transition stamps a column before dispatch and fires once per checklist. A completed or reviewed checklist is excluded. An overdue checklist does not also receive a due-soon event.