diff --git a/docs/services/scheduler.md b/docs/services/scheduler.md index 09e72b1260..1a4ef035ed 100644 --- a/docs/services/scheduler.md +++ b/docs/services/scheduler.md @@ -45,9 +45,11 @@ window are skipped. The dispatcher ticks every Rate schedules use the same dispatcher whether created or updated directly or through Step Functions. A changed future `StartDate` takes effect before the -first dispatch. The dispatcher keeps its last-fire state in memory; past dates, -restart, post-dispatch updates and re-enable timing have not been verified -against live AWS. Fixed-anchor recurrence is not implemented. +first dispatch. When a schedule last fired is stored with it, so with persistence +on a restart neither fires a one-time schedule again nor fires an immediate +catch-up for a rate or cron schedule; a one-time schedule updated to a later time +fires again at that time. Past dates, post-dispatch updates and re-enable timing +have not been verified against live AWS. Fixed-anchor recurrence is not implemented. Supported target types: SQS, Lambda, SNS, ECS `RunTask`, EventBridge `PutEvents`, and unqualified Step Functions state machine ARNs. Templated diff --git a/src/main/java/io/floci/aws/services/scheduler/ScheduleDispatcher.java b/src/main/java/io/floci/aws/services/scheduler/ScheduleDispatcher.java index 91a6b2e6c9..00f1f051fc 100644 --- a/src/main/java/io/floci/aws/services/scheduler/ScheduleDispatcher.java +++ b/src/main/java/io/floci/aws/services/scheduler/ScheduleDispatcher.java @@ -36,8 +36,9 @@ import java.util.concurrent.TimeUnit; * * A single background thread ticks on a fixed interval, scans all persisted * schedules, and invokes the target of any schedule whose next fire time has - * passed. Per-schedule "last fire" state is kept in memory (by schedule ARN); - * restarts reset it, matching the emulator's loose durability expectations. + * passed. When a schedule last fired is stored with the schedule + * ({@link Schedule#getLastFiredAt}), so with persistence on a restart neither fires a one-time + * schedule again nor fires an immediate catch-up for a rate or cron schedule. * * Scope of the initial implementation: *