Skip to main content

Module jobs

Module jobs 

Source
Expand description

Observed-tier, READ-ONLY inventory of scheduled jobs across the harnesses that have them (Domain 11, concept 6).

Three harnesses keep scheduled jobs and they keep them in three different places, at two different scopes:

  • Claude Code — SESSION-scoped runtime state. CronCreate and ScheduleWakeup records live in the session’s own JSONL, and crate::ClaudeRuntimeManifest already folds them into active_crons / pending_wakeups. There is no other store: Claude’s own success text calls these jobs “session-only”.
  • Hermes — INSTALL-scoped cron/jobs.json under HERMES_HOME, plus one per profile under profiles/<name>/cron/.
  • The orchestrator — the same cron/jobs.json, in the same two places, under SUPERCODE_ORCHESTRATOR_HOME: its folder IS a Hermes home (docs/ORCHESTRATOR-IR.md §6), so the Hermes store walk and the Hermes record projection below are pointed at it unchanged. Adding it is a home and an id, not a second reader.
  • OpenClaw — INSTALL-scoped cron/jobs.json under the OpenClaw state dir at the pinned version (2026.7.1-2). Upstream main has since migrated the store into the shared SQLite state DB; when the JSON file is gone this module reports the store as absent_store instead of failing, so a newer install produces an honest empty answer rather than an error.

Nothing here writes, claims a fire, or starts a timer. Every field is read from the harness’s own file; the uniform row below is a projection, and get_job returns the verbatim native record beside it so nothing is lost.

Field provenance for the two JSON stores is docs/HERMES-IDEAL-SUPPORT-DESIGN.md §1a/§1b, which lists them from upstream cron/jobs.py and docs/automation/cron-jobs.md. Keys that document names but not spellings (a job’s paused flag) are read tolerantly in both plausible spellings rather than guessed at in one.

Structs§

JobDeliver
Where a fire’s output is delivered.
JobPayload
What a fire actually does.
JobSchedule
A job’s firing rule, with the native expression preserved.
JobSource
One store the listing consulted, and what it found there.
JobsListing
Result of a jobs.list: the rows plus every store that was consulted.
JobsQuery
Filters for a scheduled-job read.
ScheduledJob
One harness’s scheduled job, projected onto the uniform Domain 11 row.

Enums§

JobScope
Whether a job belongs to one conversation or to the whole install.

Constants§

CLAUDE_SESSION_SCAN_LIMIT
Newest-first cap on Claude Code sessions examined when no session filter is given. Claude’s jobs are session state, so an unfiltered listing would otherwise walk the whole history; the scan is reported in JobsListing::sources so a truncated answer is never silent.
JOB_HARNESSES
Harnesses that have a scheduled-job concept at all. Every other harness answers jobs.list / jobs.get with UnsupportedAction, never an empty list — an absent verb and an empty inventory are different answers.

Functions§

get_job
Read one job by harness and id, with the verbatim native record beside the uniform row. Ok(None) means the harness has no such job.
list_jobs
Read every scheduled job the query selects.
supports_jobs
Whether harness has a scheduled-job concept.