resonate-durable-sleep-scheduled-work-java

resonate-durable-sleep-scheduled-work-java is a skill for Claude Code, Codex from resonatehq/resonate-skills. It costs 158 tokens per session (2,442 once invoked), scanned A, original, Apache-2.0.

A Java pattern for pausing workflows durably and starting recurring work on a schedule. A durable pause keeps its place through process restarts, while a cron schedule repeats work at set times.

In plain words
What is it for?
It helps build timers, countdowns, reminders, long-horizon delays, and recurring jobs in Java 21 or later.
Why use it?
It prevents long waits and recurring jobs from being lost when a worker stops, and avoids keeping a Java process occupied during a long delay.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It helps build timers, countdowns, reminders, long-horizon delays, and recurring jobs in Java 21 or later.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/resonatehq/resonate-skills/resonate-durable-sleep-scheduled-work-java
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add resonatehq/resonate-skills --skill resonate-durable-sleep-scheduled-work-java
Clone the repo
git clone --depth 1 https://github.com/resonatehq/resonate-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for resonate-durable-sleep-scheduled-work-java

README.md
[![agentmods](https://agentmods.dev/badge/skills/resonatehq/resonate-skills/resonate-durable-sleep-scheduled-work-java/github.svg)](https://agentmods.dev/skills/resonatehq/resonate-skills/resonate-durable-sleep-scheduled-work-java)
Your own site
<a href="https://agentmods.dev/skills/resonatehq/resonate-skills/resonate-durable-sleep-scheduled-work-java"><img src="https://agentmods.dev/badge/skills/resonatehq/resonate-skills/resonate-durable-sleep-scheduled-work-java/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for resonate-durable-sleep-scheduled-work-java

Your own site · 80×15
<a href="https://agentmods.dev/skills/resonatehq/resonate-skills/resonate-durable-sleep-scheduled-work-java"><img src="https://agentmods.dev/badge/skills/resonatehq/resonate-skills/resonate-durable-sleep-scheduled-work-java.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 158 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,442 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00158 $0.02442
Opus 5 $0.00079 $0.01221
Sonnet 5 $0.00032 $0.00488
Haiku 4.5 $0.00016 $0.00244

Measured 11d ago against content hash cc6403f44bed, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

resonate-durable-sleep-scheduled-work-java scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

resonate-durable-sleep-scheduled-work-java/SKILL.md · 157 lines

How it starts

The opening of the file, as written. The whole thing — 157 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 workflowctx.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 workr.schedule(...) registers a cron schedule that periodically invokes a registered function. The Java SDK includes this top-level Schedule API (plus the lower-level r.schedules sub-client); Go's 0.1.0 tag has the lower-level Schedules() sub-client (direct cron-fired promises) but not this same one-call function-dispatch convenience 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

  • Delays spanning minutes, hours, days, or weeks that must survive crashes (ctx.sleep)
  • Reminder sequences (7-day trial expiry, multi-stage onboarding drips)
  • Countdown workflows that act on each tick
  • Periodic jobs on a fixed cron (r.schedule) — daily reports, nightly reconciliation
  • Anywhere you would reach for Thread.sleep but need the work to survive a process restart

ctx.sleep basics

ctx.sleep takes a java.time.Duration and returns a future with no value to decode — await() to suspend until the timer fires.

import io.resonatehq.resonate.Context;
import java.time.Duration;

public static void reminder(Context ctx) {
    ctx.sleep(Duration.ofHours(1)).await(); // no value to decode; suspends until the timer fires
    // ... send the reminder
}

Read the full file on GitHub · 157 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 157 lines · 158 tokens per session scan A cc6403f44bed

Subscribe to this mod's changes

resonate-durable-sleep-scheduled-work-java is a skill published in the GitHub repository resonatehq/resonate-skills (6 stars, last pushed 20d ago), licensed Apache-2.0. It adds 158 tokens to every session and 2,442 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

springboot-patterns

Provides Spring Boot architecture patterns for REST APIs, layered services, JPA data access, caching, async processing, and logging. Use when working with Java Spring Boot files (.java, pom.xml) or when the user mentions Spring Boot, Spring Framework, or Java backend.

tranhieutt/software_development_department · 59 tokens

wxjava-api-contributor

A contributor guide for adding or maintaining official WeChat API support in WxJava, a Java software development kit. It covers services, request and response data objects, data conversion, HTTP handling, starter configuration, and regression tests.

binarywang/WxJava · 68 tokens

azure-communication-callautomation-java

Build call automation workflows with Azure Communication Services Call Automation Java SDK. Use when implementing IVR systems, call routing, call recording, DTMF recognition, text-to-speech, or AI-powered call flows.

microsoft/skills · 49 tokens

azure-communication-chat-java

Build real-time chat applications with Azure Communication Services Chat Java SDK. Use when implementing chat threads, messaging, participants, read receipts, typing notifications, or real-time chat features.

microsoft/skills · 41 tokens

azure-communication-common-java

Azure Communication Services common utilities for Java. Use when working with CommunicationTokenCredential, user identifiers, token refresh, or shared authentication across ACS services.

microsoft/skills · 35 tokens

azure-communication-sms-java

Send SMS messages with Azure Communication Services SMS Java SDK. Use when implementing SMS notifications, alerts, OTP delivery, bulk messaging, or delivery reports.

microsoft/skills · 36 tokens