Functions that survive restarts.
Your worker can stop. Your work doesn’t have to. Resonate records completed steps so a new worker can continue the same execution.

Your code. With a memory.
A function. Not a flowchart.
Section titled “A function. Not a flowchart.”Keep the loops and branches you already know. Wrap a step to record its result. Use a durable sleep between ticks.
for (let i = count; i > 0; i--) { yield* context.run((context: Context) => console.log(`Countdown: ${i}`)); yield* context.sleep(delay * 1000);}for i in range(count, 0, -1): await ctx.run(ntfy, i) await ctx.sleep(timedelta(seconds=delay))Give your function a second life.
Run the countdown in TypeScript, Python, Rust, Go, or Java.
Run the quickstart
