Skip to main content
Sorat includes a built-in job scheduler that lets you define recurring tasks the agent executes autonomously.

Schedule kinds

KindFieldDescription
everyevery_msRepeat at a fixed interval (milliseconds, minimum 60,000 = 1 minute)
onceat_msRun once at a specific Unix timestamp (milliseconds)
cronexprStandard cron expression (e.g. "0 9 * * 1" for every Monday at 9 AM)

How jobs execute

When a job fires, Sorat creates an ephemeral agent — a temporary instance with the full tool set, the agent’s persona and soul, and a 3-minute timeout. The job’s message field is sent as the user prompt. The ephemeral agent can use all enabled tools (shell, filesystem, web, memory, etc.) to complete the task, then the result is logged.

Creating jobs

  1. Go to the Cron Jobs page
  2. Click Create Job
  3. Enter a name, select schedule kind, configure the timing, and write the task message

Schedule examples

# Every hour
{"kind": "every", "every_ms": 3600000}

# Run once at a specific time
{"kind": "once", "at_ms": 1740500000000}

# Weekdays at 9 AM
{"kind": "cron", "expr": "0 9 * * 1-5"}

# Every Sunday at midnight
{"kind": "cron", "expr": "0 0 * * 0"}

Managing jobs

ActionAPICLI
List jobsGET /api/cron/jobsTUI > Cron Jobs > List Jobs
EnablePUT /api/cron/jobs/{id} with {"enabled": true}TUI > Cron Jobs > Enable Job
DisablePUT /api/cron/jobs/{id} with {"enabled": false}TUI > Cron Jobs > Disable Job
DeleteDELETE /api/cron/jobs/{id}TUI > Cron Jobs > Remove Job
Run nowPOST /api/cron/jobs/{id}/run
View logsGET /api/cron/jobs/{id}/logs

Execution logs

Each job keeps a log of the last 20 executions. Each entry includes:
FieldDescription
timestampWhen the job ran
status"success" or "error"
resultAgent’s text output
errorError message (if failed)
duration_msExecution time
tool_callsNumber of tool calls made

Internal mechanics

The cron service uses a 10-second ticker that checks all enabled jobs against their schedule. When a job is due:
  1. The next_run timestamp is updated immediately
  2. An ephemeral agent is spawned with the job’s message
  3. The agent runs with a 3-minute timeout
  4. Results are appended to the job’s execution log
  5. last_run, run_count, and last_status are updated
Jobs are persisted in ~/.sorat/cron/jobs.json.