resonate-durable-sleep-scheduled-work-java

Installation
SKILL.md

Resonate Durable Sleep + Scheduled Work — Java

Prerelease note. resonate-sdk-java is published on Maven Central — pin io.resonatehq:resonate-sdk-java:0.1.1. The API mirrors the Python SDK and may change before a stable 1.0. Requires Java 21+ (virtual threads, a feature generally available in Java 21). Every code block here is compile-verified against 0.1.1 and drawn from example-countdown-java / example-quickstart-java and develop/java.mdx (docs PR #230).

Overview

Two related capabilities in the Java SDK:

  1. Durable sleep inside a workflow — ctx.sleep(Duration) pauses execution; the worker process can exit and resume later without losing its place. The server holds the timer promise; the cost is one promise record, not process uptime.
  2. Scheduled / recurring work — r.schedule(...) registers a cron schedule that periodically invokes a registered function. The Java SDK includes a top-level Schedule API (plus the lower-level r.schedules sub-client); the Go SDK does not expose one yet. This removes the need for an in-workflow sleep loop or an external cron trigger.

Both patterns are durable: Resonate holds the continuation (or the schedule) in its store, not in a long-running thread.

When to use

Installs
1
GitHub Stars
6
First Seen
Aug 10, 2026
resonate-durable-sleep-scheduled-work-java — resonatehq/resonate-skills