resonate-durable-sleep-scheduled-work-rust

Schedule durable cron jobs and timed waits in Rust workflows.

6|Updated Jan 8, 2026
One-click install
npx skills add https://github.com/resonatehq/resonate-skills --skill resonate-durable-sleep-scheduled-work-rust
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: resonate-durable-sleep-scheduled-work-rust
Source: https://github.com/resonatehq/resonate-skills/tree/main/resonate-durable-sleep-scheduled-work-rust
Command: npx skills add https://github.com/resonatehq/resonate-skills --skill resonate-durable-sleep-scheduled-work-rust

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provide durable, crash-safe timed waits and cron-style scheduling for Rust workflows so long-running delays and recurring jobs do not depend on process uptime or fragile timers.

Core Features & Use Cases

  • Durable in-workflow pauses using ctx.sleep(Duration) so workers may exit and resume without losing place.
  • Ephemeral-world cron registration using resonate.schedule(name, cron, fn, input) to dispatch functions on fixed schedules and return stable invocation IDs.
  • Deletion and idempotency controls for schedules, plus patterns for reminders, nightly jobs, countdowns, and long-horizon timers.

Quick Start

Register a cron schedule named nightly-recon to invoke nightly_reconciliation at 02:00 daily and use ctx.sleep(Duration::from_secs(...)) inside your workflow to create durable delays between steps.

Frequently Asked Questions about resonate-durable-sleep-scheduled-work-rust

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement durable sleeps and timed waits in Rust workflows?

Durable sleeps in Rust workflows are implemented using ctx.sleep(Duration) within the Resonate Rust SDK, allowing workers to exit and resume timed waits without losing progress or relying on process uptime.

How do I schedule cron jobs in Rust without depending on process uptime?

Cron-scheduled invocations are registered using resonate.schedule(name, cron, fn, input), which dispatches functions on fixed schedules and returns stable invocation IDs for crash-safe recurring jobs.

What are durable sleeps used for in Rust applications?

Durable sleeps are used for long-horizon reminders, countdowns, and long-running delays where the workflow must pause safely across worker restarts without dropping the scheduled event.

Does the Resonate Rust SDK support idempotency for cron schedules?

Yes, the Resonate Rust SDK supports idempotency for cron schedules by returning stable invocation IDs, and it provides schedule deletion APIs to manage and remove registered cron jobs.

What is the best way to handle long-running timers and nightly batch jobs in Rust?

The best way to handle long-running timers and nightly batch jobs is combining ctx.sleep(Duration) for durable delays with resonate.schedule for cron-driven dispatch, ensuring jobs survive crashes.