Return to Pattern Library
Timing
Run a periodic task at a fixed cadence
Requires the Temboo extension.
Platform

ESP32

Open in VS Code
Execute recurring work at a configurable cadence without accumulating significant drift or destabilizing the application.
Applies when
Use for sensor polling, periodic telemetry, maintenance work, status updates, or to validate basic scheduler/timer behavior in firmware.
Show pattern details
Hide pattern details
Intent
Inspect the application scheduling model and implement or adapt a periodic task, timer, or work item that emits a timestamped observable event at the configured period.
Expectation
The event occurs repeatedly at approximately the requested interval for the full observation window, without unexplained skipped or duplicate executions.
Success criteria
The requested number of consecutive events is observed; each interval is within the configured tolerance unless the application deliberately documents a scheduling exception, and no events are unexpectedly skipped or duplicated.
How it is verified
Capture timestamps for a defined number of consecutive executions. Calculate inter-event intervals, identify missed/duplicate events, and look for systematic drift. If precise timing is not the application requirement, judge against the configured tolerance rather than treating scheduler jitter as a failure.