pub fn due_fire(
schedule: &str,
since: DateTime<Utc>,
now: DateTime<Utc>,
) -> Option<DateTime<Utc>>Expand description
The scheduled tick this automation owes, or None if it owes nothing yet.
since is the anchor: the last fire if there was one, otherwise the
automation’s creation time — so a newly created automation waits for its
next scheduled tick instead of firing the instant it is saved.
Missed ticks coalesce. If the daemon was down across several ticks this
returns only the most recent one, so an hour of downtime on a */5 schedule
produces a single catch-up run rather than twelve simultaneous agents.