diff --git a/crates/in-web/src/backup.rs b/crates/in-web/src/backup.rs index a01ed08..d94f233 100644 --- a/crates/in-web/src/backup.rs +++ b/crates/in-web/src/backup.rs @@ -144,7 +144,9 @@ async fn record_outcome(store: &Store, outcome: &in_core::error::Result, interval_hours: u32) -> bool { let interval = Duration::from_secs(u64::from(interval_hours) * 60 * 60); - last_attempt.is_none_or(|stamp| stamp < stamp_before(interval).as_str()) + // An attempt stamped in the future means the clock went back: run rather than wait for it. + let now = now_stamp(); + last_attempt.is_none_or(|stamp| stamp < stamp_before(interval).as_str() || stamp > now.as_str()) } /// True when there is no successful backup within the limit: [`STALE_AFTER`] or two backup intervals,