scheduler

command
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Command scheduler is the time-driven example for resolute-harness-go: an in-process ticker fires scheduled signal dispatches into a durable conversation, and deterministic per-window dispatch ids make the schedule idempotent — a killed-and-restarted process re-fires the current window's dispatch and the store deduplicates it, so nothing runs twice.

Run it keyless with a fast tick to watch it work:

TICK=10s go run ./examples/scheduler

Then, in another terminal:

# watch digests accumulate, one signal + one digest per window:
curl -N localhost:8488/agents/reporter/daily

Durability walkthrough: note the current window in the logs, `kill -9` the process, and restart it within the same window. The scheduler immediately re-dispatches that window's tick — the log shows "replayed (idempotent)" instead of "admitted", and the record stream grows no duplicate signal. The same property holds for real deployments: N replicas can all run this scheduler against one store and each window still fires exactly once.

Set GEMINI_API_KEY (and optionally MODEL) to have a real model write the digests; the tick cadence is unchanged.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL