resonate-durable-sleep-scheduled-work-rust
Installation
SKILL.md
Resonate Durable Sleep + Scheduled Work — Rust
SDK note (0.6.0). The Rust SDK is in active development. This skill covers two features in the current release:
ctx.sleep(Duration)for in-workflow durable sleep, andresonate.schedule(name, cron, fn, input)for cron-registered ephemeral-world scheduling. (Note: the Python SDK does not yet expose a top-levelschedule(); Rust does.)
Overview
Two related but distinct capabilities:
- Durable sleep inside a workflow —
ctx.sleep(Duration)pauses execution; the worker process is free to exit and resume days later without the sleep "losing its place." - Cron-scheduled invocation from the ephemeral world —
resonate.schedule(...)registers a function to fire on a cron schedule until explicitly deleted.
Both are Rust-idiomatic — Duration for in-workflow time, cron strings for cron schedules. Both are durable; Resonate holds the continuation in its store, not in a long-running process.
Durable sleep: ctx.sleep(Duration)
use resonate::prelude::*;
use std::time::Duration;