cron tool manages authored jobs; heartbeat_manage manages the agent’s built-in periodic check-in.
cron — Scheduled Jobs
Thecron 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
Payload and continuation behavior
Only
agent_turn jobs have a session strategy or continuation mode:
freshstarts a fresh scheduled session for every occurrence.rollingretains a bounded history;max_history_turnsis required and may be 1—20.noneperforms no post-run continuation.heartbeat_excerptadmits up to 4 KiB of completed visible output as a typed event for the next periodic heartbeat.origin_historyappends fully accepted delivered output idempotently to the originating conversation history. It requires the exact delivery target supplied by the trusted route.
Actions
add -- Create a scheduled job
add -- Create a scheduled job
Creates a new job. The tool resolves authoring schedules before storing them and returns strict Relative reminder:Event for the next heartbeat:
{ jobId, name, schedule } data.Parameters:Daily 9am briefing:
list -- List all scheduled jobs
list -- List all scheduled jobs
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:update -- Update an existing job
update -- Update an existing job
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. Returns
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:{ jobName, updated }.remove -- Delete a scheduled job
remove -- Delete a scheduled job
Permanently removes an authored job. Config-owned jobs cannot be removed. This destructive action uses the tool confirmation handshake.Parameters:
Returns
{ jobName, removed }.runs -- View immutable run history
runs -- View immutable run history
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:run -- Manually trigger cron execution
run -- Manually trigger cron execution
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:wake -- Submit a scheduler wake
wake -- Submit a scheduler wake
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
Anagent_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 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.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
Theheartbeat_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
get -- View heartbeat configuration
get -- View heartbeat configuration
Calls
heartbeat.get and returns { agentId, perAgent, effective }: the stored per-agent patch and, when resolvable, the effective merged configuration.Parameters:update -- Change heartbeat settings
update -- Change heartbeat settings
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.status -- Check heartbeat status
status -- Check heartbeat status
Calls
heartbeat.states and returns runtime state for every agent. Each entry contains exactly agentId, enabled, intervalMs, and nullable nextDueAtMs.Parameters:trigger -- Submit a manual heartbeat
trigger -- Submit a manual heartbeat
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 resolved job is written to
<agentWorkspace>/.scheduler/cron-jobs.json; execution starts and terminals append to<agentWorkspace>/.scheduler/cron-executions.jsonl. - The daemon binds the exact delivery target from the trusted originating conversation. Missing target parameters do not weaken that authority.
- At 9:00 Eastern on weekdays, the scheduler durably claims the occurrence, records its start, and dispatches the agent turn.
- The visible result is delivered back to the originating conversation. Because
origin_historyis selected, fully accepted text is also appended idempotently to that conversation’s history.
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 alerting —
alert_thresholdandalert_cooldown_msare separate heartbeat-source alert controls; they do not suspend cron jobs. - Delivery ambiguity —
runskeeps computationstatusseparate fromdeliveryStatus, includingpartialandunknown, 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.
Related
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
