Timestamps and scheduling guides
Weekly schedules versus rolling seven-day intervals
Compare local weekly meetings with elapsed 168-hour intervals and define the correct recurrence invariant.
Identify the recurrence requirement
Every Monday at 09:00 in a local zone preserves weekday and wall-clock time. Every 168 elapsed hours preserves duration.
These can differ when the zone's offset changes. Choose the requirement before selecting Cron or an interval scheduler.
Local weekly rule: 0 9 * * 1
Elapsed interval: 7 × 24 × 60 × 60 secondsMeasure a transition week
A weekly local event across a one-hour spring transition can be 167 elapsed hours apart, while keeping the same local hour.
Use Date Difference on explicit offsets to observe the actual interval. Do not assume all zones have one-hour transitions.
2024-03-04T09:00:00-05:00
2024-03-11T09:00:00-04:00
Elapsed: 167 hoursPersist the recurrence rule
Saving only the next timestamp loses whether it came from a local weekday rule or an elapsed interval.
Store the timezone, recurrence kind and rule version alongside future execution instants. This allows consistent rescheduling after edits.
Test completion-based intervals separately
Seven days after completion differs from seven days after the previous scheduled start when task runtime varies.
Define whether drift is allowed and whether outages pause the interval clock. A Cron preview cannot infer either policy.