Skip to main content

Polling

Polling is executing a periodic action checking for a state change. Examples are pinging a host, calling a REST API, or listing an Amazon S3 bucket for newly uploaded files.

Cadence support for long running activities and unlimited retries makes it a good fit.

Samples​

Runnable samples covering the building blocks of polling:

SampleDescriptionCode
Activity retry with heartbeatLong-running activity that heartbeats progress and retries without limitGo · Java
Durable timerFires a durable timer to take action when an operation runs too longGo

Some real-world use cases: