mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 06:00:46 -05:00
With persistence on, schedules survived a restart but the dispatcher's record of when each last fired lived in memory, so a one-time at() schedule fired again and every rate and cron schedule fired an immediate catch-up. The last fire is now stored with the schedule and never returned by the API. The dispatcher records it under the same lock as UpdateSchedule, DeleteSchedule and DeleteScheduleGroup, skipping a schedule deleted or recreated meanwhile, and UpdateSchedule keeps it. A one-time schedule fires once its time is due unless it has fired since, so an update to a later time re-arms it; rate and cron schedules count from the stored fire.