Skip to main content
What it does: Lets an agent create durable scheduled work, inspect its execution history, and manage the agent’s periodic heartbeat. Who it’s for: Anyone who wants an agent to act at a fixed cadence, at an absolute time, or after a relative delay without another user prompt. The cron tool manages authored jobs; heartbeat_manage manages the agent’s built-in periodic check-in.

cron — Scheduled Jobs

The cron tool has 8 actions (add, list, update, remove, status, runs, run, wake) and 4 schedule types (cron, every, at, in). Each agent owns a JSON job store at <agentWorkspace>/.scheduler/cron-jobs.json and an append-only execution ledger at <agentWorkspace>/.scheduler/cron-executions.jsonl. These files survive daemon restarts and are the scheduler’s durable authorities. The scheduler writes a durable claim for an occurrence and appends its started record before dispatch. Startup reconciliation can release a claim that provably stopped before start. Once a durable started record exists, or dispatch may have happened but its result is uncertain, the occurrence is terminalized as unknown and is never automatically replayed. New due occurrences and future schedules can still run normally. agent_turn and delivery jobs created through the tool are bound to the trusted originating conversation as their exact delivery target. The tool does not expose target fields, and omitting them does not create an unbound job. Add and update responses do not echo that trusted route. Tool profiles are explicit policy choices. cron-minimal is opt-in and is never silently applied to a job.

Schedule Types

Use in for relative requests such as “in two minutes”; it needs no timezone or datetime calculation. Use at only for an absolute clock time. Pass an IANA timezone for user-facing wall-clock cron and at schedules so they resolve in the user’s locale; an omitted timezone uses the agent’s configured scheduler timezone.

Payload and continuation behavior

Only agent_turn jobs have a session strategy or continuation mode:
  • fresh starts a fresh scheduled session for every occurrence.
  • rolling retains a bounded history; max_history_turns is required and may be 1—20.
  • none performs no post-run continuation.
  • heartbeat_excerpt admits up to 4 KiB of completed visible output as a typed event for the next periodic heartbeat.
  • origin_history appends fully accepted delivered output idempotently to the originating conversation history. It requires the exact delivery target supplied by the trusted route.

Actions

Creates a new job. The tool resolves authoring schedules before storing them and returns strict { jobId, name, schedule } data.Parameters:Daily 9am briefing:
Relative reminder:
Event for the next heartbeat:
Lists authored and config-owned jobs. Each projection includes id, name, agentId, source, resolved schedule, lifecycle, and payload, plus the session, continuation, target, gate, cache, or tool-policy fields that apply to that job kind.Parameters:
Changes an authored job. Config-owned jobs cannot be edited through this action. Supply a complete schedule or payload field group when replacing that part of the job. session_strategy and continuation_mode cannot be changed by the current tool; remove and recreate the job when those policies must change. A wake-gate can be set or replaced, but the tool does not expose a clear operation.Parameters:
Returns { jobName, updated }.
Permanently removes an authored job. Config-owned jobs cannot be removed. This destructive action uses the tool confirmation handshake.Parameters:Returns { jobName, removed }.
Returns maintenance and authority state, not a loose health summary. The strict result contains state, configuredEnabled, running, strictAuthoritiesValid, ownershipReconciled, jobCount, activeClaimCount, resolvedAgentId, raw store and ledger evidence, reset intent, and optional lastError.state is one of initializing, disabled, ready, active, maintenance, or failed. Each raw authority reports exists, bytes, and its SHA-256 digest; the intent reports no intent, a bounded pending phase, or an invalid digest.Parameters:
Reads immutable start/terminal groups for one job from the execution ledger. Each run projects executionId, jobId, agentId, scheduledForMs, trigger, workKind, rootRunId, startedAtMs, optional terminalAtMs and durationMs, status, deliveryStatus, optional errorKind, and optional bounded content-free counters for terminal internal actions.Run status is started, dispatched, completed, failed, aborted, skipped, or unknown. Delivery deliveryStatus is not_requested, suppressed, pre_send_failed, accepted, partial, rejected, or unknown. These are separate: a completed model turn does not imply that platform delivery was accepted.Parameters:
force runs the selected job without waiting for its schedule and returns triggered, mode, jobName, resolvedAgentId, and one executionId. due asks the scheduler to claim all currently overdue occurrences for the agent and returns triggered, mode, resolvedAgentId, and the executionIds array.The current tool requires job_name for both modes. In due mode the backend does not use that name as a filter; it evaluates the agent’s complete due set.Parameters:
Submits a routine wake to the heartbeat coordinator. agent targets the calling agent; monitoring targets the monitoring lane. This action does not inspect or execute cron jobs.The result is either accepted or coalesced and always carries correlationId, lane, and retainedReason. An accepted result also reports whether the wake created a new occurrence or upgraded one already admitted.Parameters:

Wake-Gate — Run the Model Only When It Matters

An agent_turn job may carry a wake-gate: a pre-run script that inspects a condition and decides whether the model should run for that occurrence. A quiet monitoring job can therefore poll cheaply and invoke the model only when the gate finds something actionable. The gate runs in the same jailed sandbox as an autonomous orchestrate script, under the agent’s resolved capabilities. It grants no additional capability. The cron tool exposes all three gate fields: The same fields can set or replace a gate through add and update. The timeout defaults to 30 seconds. A timed-out or failed gate is fail-open: the model wakes instead of silently dropping the occurrence.

The verdict protocol

The last non-empty stdout line is the verdict:
A crash, non-zero exit, timeout, output-cap failure, or unparseable verdict wakes the model. If the sandbox cannot be created or scheduler-initiated gates are disabled, the occurrence runs as if it had no gate.
A wake-gate is a per-job pre-run decision. The wake action submits a typed heartbeat-coordinator wake. Neither mechanism authorizes another occurrence of uncertain cron work.
Gated occurrences remain visible without exposing gathered content: a skipped occurrence appears as skipped in runs, while aggregate gate efficiency appears in the system health report. See the operations scheduler guide for the operator view.

heartbeat_manage — Agent Heartbeat

The heartbeat_manage tool controls the agent’s periodic heartbeat, which uses a separate clock from authored cron jobs. All four actions require admin trust. The heartbeat-minimal tool profile is opt-in and is never silently applied. Heartbeat response processing recognizes HEARTBEAT_OK as a soft acknowledgement and suppresses empty replies plus the shared NO_REPLY and [SILENT] markers. Plain text without the heartbeat token is an alert regardless of length; ack_max_chars applies only to residual text accompanying HEARTBEAT_OK. show_ok and show_alerts control visibility, light_context limits bootstrap context to HEARTBEAT.md, and response_prefix removes a configured prefix before classification and delivery. alert_threshold and alert_cooldown_ms govern heartbeat-source alerts; stale_ms bounds stuck-tick detection.

Actions

Calls heartbeat.get and returns { agentId, perAgent, effective }: the stored per-agent patch and, when resolvable, the effective merged configuration.Parameters:
Calls heartbeat.update, deep-merges the supplied fields into the per-agent config, validates the result, reconfigures periodic admission, and persists the config when persistence is available. It returns { agentId, config, updated, nextDueAtMs }.Parameters:Target object:The target object is atomic: flattened or partial endpoint fields are rejected.
Calls heartbeat.states and returns runtime state for every agent. Each entry contains exactly agentId, enabled, intervalMs, and nullable nextDueAtMs.Parameters:
Calls heartbeat.trigger with a manual spacing bypass. The coordinator may return accepted or coalesced; both results include correlationId, lane, and retainedReason. Accepted admissions also include their disposition. A successful tool call therefore proves admission, not necessarily a new independently running occurrence.Parameters:

End-to-end example: daily research summary

In a conversation, ask the agent to send a weekday summary back to that same conversation:
The agent creates a job without caller-supplied routing fields:
What happens next:
  1. The resolved job is written to <agentWorkspace>/.scheduler/cron-jobs.json; execution starts and terminals append to <agentWorkspace>/.scheduler/cron-executions.jsonl.
  2. The daemon binds the exact delivery target from the trusted originating conversation. Missing target parameters do not weaken that authority.
  3. At 9:00 Eastern on weekdays, the scheduler durably claims the occurrence, records its start, and dispatches the agent turn.
  4. The visible result is delivered back to the originating conversation. Because origin_history is selected, fully accepted text is also appended idempotently to that conversation’s history.
Use cron action: runs job_name: daily-research-summary limit: 5 to inspect execution and delivery outcomes, or cron action: run job_name: daily-research-summary mode: force to submit a manual occurrence.

Failure modes

  • Invalid schedule or field group — strict authoring validation rejects malformed expressions, non-positive intervals, missing schedule-specific fields, unsupported values, and incomplete payload replacements before persistence.
  • Uncertain execution — a durable started occurrence whose owner or terminal result is lost becomes an unknown terminal. The scheduler never guesses that it is safe to replay.
  • Cron dependency suspension — only consecutive provider/dependency failures count toward maxConsecutiveDependencyErrors; reaching the configured limit pauses that cron job. Ordinary validation or agent-output failures do not consume this dependency-only budget.
  • Heartbeat alertingalert_threshold and alert_cooldown_ms are separate heartbeat-source alert controls; they do not suspend cron jobs.
  • Delivery ambiguityruns keeps computation status separate from deliveryStatus, including partial and unknown, so accepted platform delivery is never inferred from a completed turn.
  • Heartbeat suppression — The heartbeat response rules, visibility settings, or a missing target can legitimately produce no delivered heartbeat message while the execution remains observable.

Operations Scheduler

Server-side scheduler configuration and monitoring

Agent Tools Overview

Master reference table of all tools

Tool Policy

Explicit tool-profile selection for scheduled work

Sessions

Session and history behavior