Durable timer
Why you need it
Sleep for seconds or months without holding a worker thread or paying for an idle container.
Code examples
Choose an SDK (preference is sticky in this browser; default Python).
def wait_for(self, context, input):
return Wait.any_of(Timer.by_duration(timedelta(hours=24)))
Use Timer.by_duration (or calendar APIs) inside wait_for.
How Dex implements it
Timers are persisted as durable conditions. When a timer fires, Dex resumes the waiting Step. Workers are not blocked while waiting.
Traditional workarounds
Classic workarounds: delayed queue messages, cron “wakeups”, or sleeping threads that evaporate on restart.