Skip to content

Scheduling & SOP tools

The cron_* tool family, the legacy schedule tool, and the SOP execution tools.

This page documents the agent tools your Revka agent uses to schedule work and to drive Standard Operating Procedures (SOPs) from inside a session. There are two distinct families:

  • The cron_* toolscron_add, cron_list, cron_remove, cron_update, cron_run, and cron_runs — create and manage scheduled jobs, plus the older schedule tool kept for backward compatibility.
  • The sop_* toolssop_list, sop_execute, sop_advance, sop_approve, and sop_status — list and run SOPs and walk them through their approval gates.

Use this page when you need the exact parameters each tool accepts. For the operator-facing CLI equivalents see revka cron and revka skills, workflows & sop; for the conceptual model see Cron overview & expressions and SOP reference: syntax, triggers & execution. The same jobs and runs are reachable over HTTP — see Cron, sessions & attachments API.

A cron job has one of three schedule shapes and one of two job types the agent can create.

Schedule (the schedule field is oneOf):

ShapeJSONRepeats?Timezone-aware?
Cron expression{"kind":"cron","expr":"0 9 * * 1-5","tz":"America/New_York"}YesYes (tz)
Interval{"kind":"every","every_ms":3600000}YesNo
One-shot{"kind":"at","at":"2026-12-31T23:59:00Z"}NoNo (always UTC)
  • expr is a 5-, 6-, or 7-field cron expression. Standard 5-field crontab syntax is normalized internally (a seconds field is prepended and the weekday column is renumbered). Write the familiar 1 = Monday numbering.
  • tz is an optional IANA timezone name and is honored only for cron schedules; at and every ignore it. Omitting tz defaults to UTC, not host-local time.
  • every_ms must be a positive integer. at must be an RFC 3339 UTC datetime in the future.

Job types:

  • shell — runs a command via sh -c. Validated against the security policy at creation and again at run time; medium-risk commands need approval. Requires command.
  • agent — runs a prompt through the Revka agent with relevant memory context injected. Blocked in read-only mode. Requires prompt. (A third type, workflow, exists but is managed by workflow YAML triggers and cannot be created with these tools.)

Creates a new shell or agent cron job. This is the preferred tool for scheduling agent-driven tasks and for sending scheduled messages to a channel.

{
"name": "morning-brief",
"schedule": {"kind": "cron", "expr": "0 9 * * 1-5", "tz": "America/New_York"},
"job_type": "agent",
"prompt": "Summarize overnight alerts and post to the channel",
"delivery": {"mode": "announce", "channel": "discord", "to": "1234567890", "best_effort": true}
}
FieldTypeMeaning
scheduleobject (required)cron / at / every object. Tolerates being passed as a JSON-stringified object.
job_typestring"shell" or "agent"; inferred as "agent" when only prompt is given.
commandstringShell command — required for shell jobs.
promptstringAgent prompt — required for agent jobs.
namestringOptional human-readable label.
session_targetstring"isolated" (default) or "main".
modelstringModel override for agent jobs.
allowed_toolsarrayTool names to whitelist for agent jobs; an empty array means all tools.
deliveryobjectRoutes job output to a chat channel after each run (see Delivery / announce mode).
delete_after_runbooleanDefaults to true for at schedules.
approvedbooleanfalse by default; set true to approve a medium-risk shell command in supervised mode.

A minimal shell job:

{
"schedule": {"kind": "cron", "expr": "*/5 * * * *"},
"job_type": "shell",
"command": "echo ok"
}

Lists every registered job as a JSON array. Read-only; no security restrictions. Takes no parameters.

{}

Returns [] when there are no jobs. Errors if cron.enabled = false.

Permanently deletes a job by ID, along with its run history (the cron_runs rows cascade). Cannot be undone — to disable a job without deleting it, set enabled: false with cron_update instead.

{"job_id": "<uuid>"}
FieldTypeMeaning
job_idstring (required)UUID returned by cron_add or cron_list.

Blocked in read-only mode and when rate-limited; errors if the job is not found.

Patches one or more fields of an existing job. Only fields present in patch change; omitted fields keep their current values.

{
"job_id": "<uuid>",
"patch": {"enabled": false}
}
{
"job_id": "<uuid>",
"patch": {
"schedule": {"kind": "cron", "expr": "0 10 * * *"},
"prompt": "New prompt text"
}
}
FieldTypeMeaning
job_idstring (required)Target job’s UUID.
patchobject (required)Any subset of: name, enabled, command, prompt, model, allowed_tools, session_target, delete_after_run, schedule, delivery.
approvedbooleanApproval for a changed shell command in supervised mode.

Immediately force-executes a job outside its normal schedule, records the result in run history, and updates last-run metadata. It does not reschedule the job — next_run is unchanged. Useful for testing a job on demand.

{"job_id": "<uuid>", "approved": true}
FieldTypeMeaning
job_idstring (required)Target job’s UUID.
approvedbooleanApproval for a medium-risk shell command in supervised mode.

Returns {job_id, status, duration_ms, output}. Shell jobs re-validate the command at run time (the policy may have changed since creation). Blocked in read-only mode and when rate-limited.

Returns recent execution history for a job: timestamps, status, duration, and truncated output. Read-only; no security restrictions.

{"job_id": "<uuid>", "limit": 10}
FieldTypeMeaning
job_idstring (required)UUID string.
limitintegerNumber of runs to return; default 10.

Output is truncated to 500 characters per run in the tool response. The stored record holds up to 16 KB; how many records are retained per job is governed by cron.max_run_history.

An earlier, shell-only scheduling tool. It supports a wider set of actions but only creates shell jobs, and its output goes only to logs — it has no delivery, no agent jobs, and no timezone control. Documented for backward compatibility; prefer cron_add for new integrations.

{"action": "create", "expression": "*/5 * * * *", "command": "backup.sh"}
{"action": "once", "delay": "30m", "command": "echo once"}
{"action": "list"}
{"action": "get", "id": "<uuid>"}
{"action": "pause", "id": "<uuid>"}
{"action": "resume", "id": "<uuid>"}
{"action": "cancel", "id": "<uuid>"}
{"action": "remove", "id": "<uuid>"}
FieldTypeMeaning
actionstring (required)create | add | once | list | get | cancel | remove | pause | resume.
expressionstringCron expression (for create / add).
delaystringHuman delay such as "30m", "2h", "1d" (for once).
run_atstringRFC 3339 timestamp for an absolute one-shot.
commandstringShell command (required for create / add / once).
idstringJob UUID for get / cancel / remove / pause / resume.
approvedbooleanApproval for supervised mode.

The delivery object on cron_add and cron_update routes a job’s output to a chat channel after each run.

"delivery": {
"mode": "announce",
"channel": "discord",
"to": "1234567890",
"best_effort": true
}
FieldTypeMeaning
modestring"none" (default) or "announce".
channelstring"telegram", "discord", "slack", "mattermost", "signal", "matrix", "qq", or "whatsapp".
tostringDestination identifier (Discord channel ID, Telegram chat ID, Slack channel name, Matrix room ID, etc.).
best_effortbooleanDefault true. When false, a delivery failure marks the run as "error" even if the job itself succeeded.

Standard Operating Procedures are deterministic, multi-step procedures defined as SOP.toml + SOP.md files on disk and run by Revka’s SOP engine. These tools let the agent list SOPs, start a run, walk it step by step, and clear approval gates. They require an SOPs directory to be configured (sop.sops_dir); see SOP reference: syntax, triggers & execution for definitions, triggers, and execution modes.

A typical loop is: sop_execute to start a run → repeat sop_advance (clearing any gate with sop_approve) until the run completes → sop_status to check state at any time.

Lists all loaded SOPs with their triggers, priority, step count, and active-run count. Optional filters.

{"filter": "incident"}
FieldTypeMeaning
filterstringSubstring filter on the SOP name.
prioritystringFilter by priority level (low | normal | high | critical).

Manually triggers a SOP by name. Returns the run ID and the first step’s instruction. The run ID is required by every subsequent sop_advance, sop_approve, and sop_status call.

{"name": "incident-response"}
FieldTypeMeaning
namestring (required)SOP name as shown by sop_list.

Reports the result of the current step and advances the run to the next step.

{"run_id": "run_abc123", "success": true, "output": "Backup completed successfully"}
FieldTypeMeaning
run_idstring (required)Run ID from sop_execute.
successboolean (required)Whether the step succeeded.
outputstring (required)Brief output summary for this step.

Approves a step that is waiting for operator approval and returns the step instruction to execute. Approval gates appear in modes such as supervised and step_by_step, on steps marked requires_confirmation, and at deterministic checkpoints; a run paused on a gate shows status waiting_approval or paused_checkpoint.

{"run_id": "run_abc123"}
FieldTypeMeaning
run_idstring (required)Run ID of the paused run.

Queries SOP execution status. Pass a run_id for one run, a sop_name to list runs for a given SOP, or no arguments to show all active runs.

{}
{"run_id": "run_abc123"}
{"sop_name": "incident-response"}
FieldTypeMeaning
run_idstringA specific run.
sop_namestringList runs for this SOP.

Run status is one of pending, running, waiting_approval, paused_checkpoint, completed, failed, or cancelled.