Scheduling Guide
Meerkat’s scheduler persists schedules and projects concrete occurrences from them.What this guide is for
Use this guide when you want to:- create durable automated work
- understand trigger and target shapes
- choose overlap/misfire policies
- decide between host APIs and agent-side schedule tools
- A schedule is the durable rule: trigger + target + policies.
- An occurrence is one planned delivery produced from that rule.
- The driver first holds the store-issued executor lease, then claims due occurrences and delivers them to the target at runtime.
Host APIs vs agent tools
Use the typed host APIs when your application is managing schedules directly:- JSON-RPC:
schedule/create,schedule/list,schedule/get,schedule/update,schedule/pause,schedule/resume,schedule/delete,schedule/occurrences - REST:
POST /schedules,GET /schedules,GET /schedules/{id},PATCH /schedules/{id},POST /schedules/{id}/pause,POST /schedules/{id}/resume,DELETE /schedules/{id},GET /schedules/{id}/occurrences
meerkat_schedule_create, meerkat_schedule_get, and meerkat_schedule_occurrences.
When skills are enabled and the schedule capability is available, agents can
load the schedule-workflow companion skill for schedule authoring guidance.
Use WorkGraph for shared pending work and dependencies; use Schedule for time.
Create a schedule
- JSON-RPC
- REST
- Rust SDK
Trigger types
Once
Fire one time at an exact UTC timestamp.Interval
Fire repeatedly at a fixed cadence.end_at_utc to stop the schedule automatically:
Calendar
Fire at named wall-clock times in a timezone. Omitted fields default to{"kind":"any"}.
Target types
Session targets
target_kind must be "session" with one of these type variants:
exact_session: deliver to one specific existing sessionresumable_session: deliver to a specific session that may be idle/suspendedmaterialize_on_demand_session: create a session on first fire, then reuse it
meerkat_schedule_create and
meerkat_schedule_update also accept the host-only current_session
shortcut:
resumable_session target. A mob member becomes a host-minted
resumable_identity target, so replacing that member’s session does not
strand future occurrences. current_session is not part of the REST or
JSON-RPC target schema.
Identity targets
target_kind must be "identity"; the current variant is
resumable_identity. The host resolves the stable identity to the current
materialized session at delivery time.
system_prompt, skill_refs, and additional_instructions.
Mob targets
target_kind must be "mob" with one of these type variants:
member: deliver content to a specific mob memberflow: run a named mob flowspawn_helper: create a helper in a mob and wait for itfork_helper: fork from an existing member and wait for it
Host-runnable targets
target_kind: "host_runnable" fires a named callback the embedding host
registered with the schedule surface at startup (library hosts only — the
stock rkat binaries register none). Occurrences flow through the normal
occurrence lifecycle, so listing, history, receipts, and failure surfaces
work exactly as for session and mob targets. An unregistered runnable is a
missing target (your missing_target_policy applies); a callback failure
records a runtime_rejected delivery failure.
params is an optional host-owned JSON payload handed to the runnable
verbatim; Meerkat never interprets it. The payload must be non-null valid JSON
and is canonicalized before it participates in the durable target identity.
For long-running work, register a runnable that submits or ensures a durable
job and returns immediately after durable acceptance. Use the occurrence ID as
the stable submission key. The built-in ScheduledDurableJobRunnable follows
this pattern: Schedule owns when to submit, while the jobs subsystem owns the
attempt, lease, progress, cancellation, and terminal result.
Policies
Misfire policy
What happens when an occurrence is materially late:{"type":"skip"}: skip overdue work after the grace window{"type":"catch_up_within","window_seconds":300}: catch up if still within the lateness window
Overlap policy
What happens when the next occurrence fires while previous work is still active:skip_if_running(recommended)allow_concurrent
Missing target policy
What happens when the target is missing at fire time:mark_misfired(recommended)skip
Recommended defaults
For most recurring jobs, start with:Schedule lifecycle
Schedule phase is intentionally small:activepauseddeleted
pendingclaimeddispatchingawaiting_completioncompletedskippedmisfiredsupersededdelivery_failed
schedule/occurrences or GET /schedules/{id}/occurrences to inspect what actually fired and why.
Executor Lease And Crash Recovery
The store issues a fenced executor lease to one driver incarnation. Only that lease holder can plan or claim firing work. A standby driver reports a healthy non-authorized tick and can take over after release or expiry. The default occurrence claim lease is 60 seconds; a long delivery renews it around the half-lease point. Each dispatch also carries a stable occurrence-level delivery identity. If target admission succeeds but recording the receipt fails, recovery retries the same identity. Target hosts must reconcile or deduplicate that identity; the scheduler does not claim exactly-once behavior for arbitrary external effects. Poisoned schedule and occurrence rows are isolated as typed per-row faults so healthy rows can continue. Hosts should surface the driver fault report rather than treating a successful partial tick as a clean scheduler.Agent-side schedule tools
When scheduling is exposed inside a running agent, the canonical tool names are:meerkat_schedule_createmeerkat_schedule_getmeerkat_schedule_listmeerkat_schedule_updatemeerkat_schedule_pausemeerkat_schedule_resumemeerkat_schedule_deletemeerkat_schedule_occurrences
schedule/* over RPC and /schedules/* over REST).
Agent-authored spawn_helper and fork_helper schedules capture the creator’s
effective tool-access policy at creation time. This prevents a scheduled
helper from gaining tools the creator could not use. Public host APIs reject
helper-tooling modes that depend on an active parent context.
