Cron jobs
Two files define the scheduled jobs, one per profile, and which one an entry belongs in follows from what runs it. For the story of what these jobs achieve together, see Proactive autonomy; for the mechanism, What fires the schedule.
agents/chat/defaults/cron/jobs.json is the Planning Agent’s roster, and the only store the gateway’s own ticker advances. The exception is the experimental platformFrontDoor flag: once it has re-homed the gateway, the ticked store moves to the Platform Agent’s roster and this one stops. Every entry on it is a no_agent script job, a plain subprocess with no model prompted, because that profile’s toolsets are stripped to mcp-router, kanban and memory and it could not run an audit if asked.
Five jobs ship:
profile-cron-tick, the every-minute dispatcher that ticks every named profile with work due.- The hourly
cluster-agent-reconcilesweep, which keeps Cluster Agent profiles aligned with the live fleet. oobe, which runs first-run onboarding as stages: delivery of the inventory report, the inventory scan, and thenfleet-wide-cost-analysis,compliance-audit,obtainability-auditandstockout-preventiononce, one after another, starting as soon as the scan settles. It removes itself once the report was claimed a few minutes ago and its audits stage is done.- The old
bootstrap-inventory-scanandbootstrap-inventory-deliveryentries, which ship disabled.
agents/platform/cron/jobs.json is the Platform Agent’s roster. It carries the governance watchdogs (the shipping jobs below lists each with its schedule) plus the no_agent entries that run no model:
github-repo-watcher.kanban-block-recheck, which re-checks the condition behind a blocked card four times an hour and retries the card when it has cleared.eod-event-watcher-daily-report, the daily recap described below.upgrade-readiness-watchandupgrade-readiness-weekly-review, the daily and the Saturday readiness readers. The Saturday one feeds the findings queue and is followed byupgrade-readiness-weekly-brief, a prompt job that is not an audit.sa-role-watch, which says in chat when the agent’s Google service account holds a role beyond theread-onlypermission set in the management project or a project inspec.scope. It speaks when the role appears, once a day from 12:00 UTC while it is held, and when it goes.findings-morning-nudge, the findings-queue nudge described below.kanban-workspace-gc, the kanban workspace collector.session-retention, which runs Hermes’ own session pruning daily for every profile so a store the gateway or a worker never reopens still ages out (spec.harness.retention.sessionDays).kanban-board-health, which names any kanban card blocked past a day in chat by its title and how long it has waited, newest first; cards with the same title that wait on a person, or do not, share a row. In Slack, on Google Chat and on Microsoft Teams, each row has Retry and Drop buttons, which unblock or archive its cards while they are still blocked and then say who did it and when. It posts when a card first gets stuck and then once a week while any stays stuck.leeway-watch, which runsleeway reportacross the fleet daily through the shell sandbox and posts to chat on new, escalated or weekly-refreshed topology and ComputeClass rank findings, and when a tracked finding resolves.chat-delivery-watch, which notices when scheduled reports stop reaching chat and says so on a GitHub ledger issue and in Cloud Logging rather than in chat.stall-watch, which sweeps the namespaces of every running or reconciling cluster that has a Cluster Agent every half hour for controllers that stopped reconciling. It raises an alert per namespace with a new stall, at most three a tick; the cluster’s Cluster Agent triages it in the alert’s thread. The watch posts one line of its own when the stall clears, and one when a sweep stops at its budget, saying what it covered and where the next tick resumes. The ledger (profiles/platform/cron/stall_watch.jsonon the agent’s volume) holds what the last tick and each cluster cost in itstick_timingandcluster_timingsentries.spec.harness.stallWatchtunes which namespaces and kinds it reads and how old a stall must be before it alerts.feedback-prompt, described below.
profile-cron-tick is what makes it live: each watchdog is a real cron run in its own process, with that profile’s persona and toolsets and the entry’s own skills, model and max_turns. No id may appear on both rosters: two rosters both carrying one is that audit running twice per schedule, concurrently with itself.
On an install nobody has messaged for a week the dispatcher thins this roster’s model-run entries and leaves the no_agent ones alone; Idle installs has the stages and the two variables that tune them. After a pause it skips a model-run entry’s catch-up when the entry is a whole period late and spaces the rest out; Catch-ups after a pause has the rule and the variable that tunes it.
eod-event-watcher-daily-report is one of those: a script that renders the k8s-event-watcher recap straight from the session ledger and delivers its stdout verbatim. It sits here despite needing none of the profile’s toolsets because what it reads belongs to the Platform Agent: the session database. Scripts are shared rather than per-profile (the entrypoint links profiles/platform/scripts at the shared directory), so script resolves here exactly as it does on the Planning Agent’s roster.
findings-morning-nudge names findings from the findings queue in the home chat channel, paced so the first days bring a short list rather than the whole queue. It runs hourly and says nothing on most runs. New critical findings are added from 12:00 UTC, at most two a UTC day. Non-critical ones are added from 16:00 UTC, at most three a UTC day, and only while no critical is waiting for a decision, for 12:00 UTC, or for the next day’s allowance. While any non-critical finding it named is still undecided, it adds nothing new of any severity until that finding is dismissed, snoozed or accepted.
Once a UTC day, on its first run at or after 12:00 UTC, it repeats up to FINDINGS_DAILY_CRITICALS of the undecided critical findings it named before. It also surfaces any non-critical finding that is holding new findings back and notes that new additions are paused until it is accepted, snoozed or dismissed. While a critical finding it named is undecided, non-critical findings wait without a separate hold notice.
Where cards are on and more findings are open, each message carries a queue breakdown: the next ten findings by rank, one line each, and a table of up to 15 clusters. The breakdown is collapsed on Slack and open on Google Chat, where the table is a monospace block.
One check failing on several objects in one cluster counts as one finding, and its line says how many other objects it covers. The message shows no finding ID: reply in its thread and name the finding by its workload and cluster, with the decision (dismiss, snooze until a date, or accept). The agent reads the IDs from what it stored for that thread: the latest message’s findings, and those of up to four earlier messages of the day in it.
A decision reaches the undecided objects that a message has already named. That scope includes objects the last complete sweep stopped reporting, while any object added later stays open until a message names it. Findings you ask for yourself are never counted, and dismissing or snoozing a finding gives no allowance back the same day.
The critical findings the first inventory report names count as added on the UTC day it is delivered, against that day’s allowance, and are repeated from the next day. It adds nothing until the first inventory report’s delivery is claimed, or until 24 hours after onboarding filed its sweep if the report has still not been delivered by then. A run that cannot read the queue fails, which is reported in chat, at most once a UTC day.
These environment variables change the limits. Set them through the chart value platformAgent.deployment.env, the same way as the two FEEDBACK_PROMPT_* variables below:
| Variable | Default | Meaning |
|---|---|---|
FINDINGS_FIRST_REPORT_CRITICALS |
2 |
critical findings the first inventory report names |
FINDINGS_DAILY_CRITICALS |
2 |
new critical findings added per UTC day, and how many are repeated |
FINDINGS_NONCRITICAL_MAX |
3 |
new non-critical findings added per UTC day |
FINDINGS_NONCRITICAL_AFTER_HOUR |
16 |
the UTC hour (0–23) from which non-critical findings are added |
FINDINGS_FIRST_REPORT_CRITICALS is read once, when onboarding files the card that writes the first report, so a later change does not reach that report. The report names at most 20 of them, the rows one chat message carries, whatever the value; the rest are queued. 0 adds none of that kind, and for the first report it means the report names none; it does not lift the limit, unlike the alert ceilings’ ALERT_DAILY_LIMIT_*.
A value that is not a whole number, is negative, or (for the hour) is outside 0–23 is ignored and the default applies. The warning goes to the run’s stderr, which the scheduler keeps nowhere for a run that succeeds.
enabled: false on the roster entry turns the nudge off.
feedback-prompt is the one entry that asks the operator something instead of reporting on the fleet. A week after its first tick it posts one message in the install’s home chat channel: how kube-agents has been working out, the public feedback form’s short link, and the form’s disclosure that a submission becomes a public issue. The message also says that a reply in the thread reaches the agent.
It is delivered once per install, guarded by two marker files in the Platform Agent’s profile home on the data volume: .feedback_prompt_armed (the first tick, which starts the clock) and .feedback_prompt_sent (the claim, taken before the message is printed). So a pod restart or an upgrade never re-sends it; only an uninstall and reinstall does.
It is at most once: a post the scheduler records as undelivered (the relay or the chat platform was down that day, or no chat platform was bound yet) is not retried. The delivery record cannot tell a post that landed from one that did not, and a repeat would risk posting twice. Removing .feedback_prompt_sent sends it again on the next tick.
Two environment variables are its per-install configuration, set through the chart value platformAgent.deployment.env. On an install.sh install, that is a TF_VAR_extra_helm_values line in install.env. Breaking changes in recent releases shows the line for KAGE_SLACK_UX, names the run that applies the line, and shows how to merge the entry into a line that is already there. On a hand-driven Terraform apply, it is extra_helm_values in terraform.tfvars. A hand edit of the CR’s spec.deployment.env can be lost at the next chart apply.
| Variable | Default | Meaning |
|---|---|---|
FEEDBACK_PROMPT_ENABLED |
true |
false turns it off. An install that turns it back on later still gets exactly one. |
FEEDBACK_PROMPT_DELAY |
7d |
<n>d, <n>h or <n>m. The job runs daily, so the message lands on the first 13:00 UTC tick at or after the delay. A value that does not parse fails the run, which is reported in chat like any other script failure. |
The form URL is not configurable. enabled: false on the roster entry is the fleet-wide switch, as for every other job.
leeway-watch posts topology and ComputeClass rank findings from its daily sweep. Five environment variables set which findings it posts and how often it posts an open one again. Set them through the chart value platformAgent.deployment.env, the same way as the feedback prompt’s two above.
| Variable | Default | Meaning |
|---|---|---|
LEEWAY_WATCH_MIN_SEVERITY |
info |
the lowest severity posted: info, warning or critical |
LEEWAY_WATCH_MIN_DRIFT |
0 |
the lowest drift score (0–1) a topology finding needs |
LEEWAY_WATCH_MIN_MAX_DOMAIN_SHARE |
0 |
the lowest share of a workload’s pods in its fullest zone (0–1) a topology finding needs |
LEEWAY_WATCH_MIN_EXCESS_OVER_FLOOR |
1 |
how many replicas (0–10000) past the most even spread possible a skew with no identified cause needs; 0 posts even the most even spread |
LEEWAY_WATCH_REFRESH_DAYS |
7 |
days before a finding still open is posted again (1–365) |
A zone that takes no pods is posted whatever the drift, share and floor thresholds say, though LEEWAY_WATCH_MIN_SEVERITY still applies to it. A workload confined to one zone by its node selector skips LEEWAY_WATCH_MIN_DRIFT only. A value that does not parse or is out of range is ignored and the default applies. A finding a threshold holds back is not reported as cleared.
The shipping jobs
Section titled “The shipping jobs”Generated from agents/chat/defaults/cron/jobs.json and agents/platform/cron/jobs.json. Retired ids are omitted. An id on its way out ships switched off for a release before it is deleted. A disabled entry on the Platform Agent’s roster is left out of this table rather than listed as a job an operator could reach. See The retired jobs.
| ID | Profile | Schedule | Cadence | Enabled | Runs |
|---|---|---|---|---|---|
profile-cron-tick |
Planning Agent | * * * * * |
— | yes | profile_cron_tick.py |
cluster-agent-reconcile |
Planning Agent | 11 * * * * |
Hourly at :11 | yes | cluster_agent_reconcile.py |
bootstrap-inventory-scan |
Planning Agent | * * * * * |
— | no | bootstrap_scan_gate.py |
bootstrap-inventory-delivery |
Planning Agent | * * * * * |
— | no | bootstrap_delivery.py |
oobe |
Planning Agent | * * * * * |
— | yes | oobe.py |
compliance-audit |
Platform Agent | 20 6 * * * |
Daily 06:20 | yes | Run the daily fleet security and RBAC posture audit. Read the SOP at ’/opt/data/profiles/platform/governanc… |
obtainability-audit |
Platform Agent | 50 6 * * * |
Daily 06:50 | yes | Run the daily workload reliability audit. Read the SOP at ’/opt/data/profiles/platform/governance/obtainabi… |
security-patch-orchestrator |
Platform Agent | 20 7 * * 1 |
Weekly, Monday 07:20 | yes | Run the weekly GKE upgrade and patch readiness audit. Read the SOP at ’/opt/data/profiles/platform/governan… |
fleet-wide-cost-analysis |
Platform Agent | 50 7 * * 1 |
Weekly, Monday 07:50 | yes | Run the weekly fleet waste audit. Read the SOP at ’/opt/data/profiles/platform/governance/fleet_wide_cost_a… |
fleet-consistency-drift |
Platform Agent | 20 8 * * 1 |
Weekly, Monday 08:20 | yes | Run the weekly fleet consistency drift audit. Read the SOP at ’/opt/data/profiles/platform/governance/fleet… |
ai-security-audit |
Platform Agent | 50 8 * * * |
Daily 08:50 | yes | Run the daily AI workload security audit. Read the SOP at ’/opt/data/profiles/platform/governance/ai_securi… |
stockout-prevention |
Platform Agent | 20 9 * * * |
Daily 09:20 | yes | Run the daily fleet stockout prevention and capacity audit. Read the SOP at ’/opt/data/profiles/platform/go… |
gcp-networking-fabric-audit |
Platform Agent | 0 8 * * * |
Daily 08:00 | yes | Run the daily GCP networking fabric and VPC IPAM audit. Read the SOP at ’/opt/data/profiles/platform/govern… |
gce-compute-fleet-audit |
Platform Agent | 45 7 * * * |
Daily 07:45 | yes | Run the daily GCE Compute Engine and MIG fleet audit. Read the SOP at ’/opt/data/profiles/platform/governan… |
upgrade-retrospective |
Platform Agent | 0 18 * * 0 |
Weekly, Sunday 18:00 | yes | Run the weekly upgrade retrospective. Read the SOP at ’/opt/data/profiles/platform/governance/upgrade_retro… |
findings-morning-nudge |
Platform Agent | 0 * * * * |
Hourly | yes | findings_nudge.py |
github-repo-watcher |
Platform Agent | */10 * * * * |
Every 10 minutes | yes | github_scan_gate.py |
kanban-workspace-gc |
Platform Agent | 40 5 * * * |
Daily 05:40 | yes | kanban_workspace_gc.py |
session-retention |
Platform Agent | 50 5 * * * |
Daily 05:50 | yes | session_retention.py |
kanban-board-health |
Platform Agent | 35 12 * * * |
Daily 12:35 | yes | kanban_board_health.py |
kanban-block-recheck |
Platform Agent | 7,22,37,52 * * * * |
Four times an hour (:07, :22, :37, :52) | yes | kanban_block_recheck.py |
feedback-prompt |
Platform Agent | 0 13 * * * |
Daily 13:00 | yes | feedback_prompt.py |
eod-event-watcher-daily-report |
Platform Agent | 0 21 * * 1-5 |
Weekdays 21:00 | yes | eod_report_generator.py |
stall-watch |
Platform Agent | */30 * * * * |
Every 30 minutes | yes | stall_watch.py |
post-merge-check |
Platform Agent | */5 * * * * |
Every 5 minutes | yes | post_merge_check.py |
upgrade-readiness-watch |
Platform Agent | 10 10 * * * |
Daily 10:10 | yes | upgrade_readiness_watch.py |
upgrade-readiness-weekly-review |
Platform Agent | 0 6 * * 6 |
Weekly, Saturday 06:00 | yes | upgrade_readiness_review.py |
upgrade-readiness-weekly-brief |
Platform Agent | 0 7 * * 6 |
Weekly, Saturday 07:00 | yes | Write this week’s upgrade readiness brief. Read the SOP at ’/opt/data/profiles/platform/governance/upgrade_… |
sa-role-watch |
Platform Agent | 25 * * * * |
Hourly at :25 | yes | sa_role_watch.py |
leeway-watch |
Platform Agent | 30 8 * * * |
Daily 08:30 | yes | leeway_watch.py |
chat-delivery-watch |
Platform Agent | */30 * * * * |
Every 30 minutes | yes | chat_delivery_watch.py |
Job schema
Section titled “Job schema”Both rosters use one schema. A governance watchdog:
{ "id": "compliance-audit", "name": "Security & RBAC Posture Audit", "schedule": { "kind": "cron", "expr": "20 6 * * *", "display": "20 6 * * *" }, "prompt": "Run the daily fleet security and RBAC posture audit. Read the SOP at '/opt/data/profiles/platform/governance/compliance_audit_sop.md' — all 551 lines of it, before you run anything. Its twenty-two checks are section 2, lines 90-479, so a read that stops early skips almost the entire audit and reports a clean fleet it never looked at. Section 2 opens by running the collector (`/opt/data/profiles/platform/skills/fleet-audit/scripts/collect.py compliance-audit`) in the foreground with the terminal tool's timeout: 600 (the foreground maximum), --workspace set to the workspace start returned and --out /opt/data/scratch/manifest_compliance-audit.json: run it before evaluating any check by hand, run precheck on it, read the manifest the way section 2 says, and pass the same file to precheck and then to finish as --manifest-file (if the collector wrote none, section 2 says what to pass instead). This is a scheduled run, so pass --scheduled to precheck and finish (and to no other command): only a scheduled run can get silent_ok true, and only a scheduled run is closed by precheck when the collector finds the fleet unchanged since the last one. Then execute it exactly, using the fleet-audit skill to open and close the audit run.", "skills": [ "fleet-audit" ], "max_turns": 250, "risk": "low", "enabled": true, "deliver": "chat"}| Field | Type | Purpose |
|---|---|---|
id |
string | Stable identifier used in observability and enable/disable ops. It survives renames — obtainability-audit is now the Workload Reliability Audit. |
name |
string | Human-readable name for logs. For the audits it is also the ledger issue title, via the AUDITS map in fleet-audit’s audit_report.py. |
risk |
string | Declared risk tier ("low" or "high"). For agentic jobs, "high" enforces a read-only policy (cron_command_policy_block); "low" retains the configured mode. Runtime-created jobs default to "low", legacy volume entries backfill to "low", and unannotated in-flight dispatches default fail-closed to "high". For no_agent: true jobs, "high" is an input-threat label. It marks repository events for github-repo-watcher, and cluster status and event text for stall-watch (which its alerts leave out and the Cluster Agent reads again). It also marks the budget, pool, exclusion and webhook names of every cluster for upgrade-readiness-watch and upgrade-readiness-weekly-review. For leeway-watch it marks the namespace, workload and ComputeClass names its findings carry. |
schedule.kind |
string | "cron" on every entry. "interval" is supported but unused: Hermes re-anchors an interval job to when the last run finished, and the gateway ticker sleeps a fixed 60 seconds after each tick returns, so a 1-minute interval fires every two. |
schedule.expr |
string | Standard 5-field cron expression, evaluated in the pod’s time zone (UTC unless overridden). |
schedule.display |
string | Display form (usually equal to expr). |
prompt |
string | What the run is asked to do, copied verbatim into the turn. Governance jobs name their SOP relative to the profile home — governance/<sop>.md. It lives here and nowhere else. |
skills |
array of string | The skills the run needs. The scheduler force-loads each one’s text ahead of the first turn, rather than leaving the load to the model’s discretion. The audit watchdogs use fleet-audit. A no_agent job prompts no model, so the field is ignored there. |
no_agent |
bool | Set on every Planning Agent job and on the Platform Agent’s script entries, github-repo-watcher, eod-event-watcher-daily-report, findings-morning-nudge, kanban-workspace-gc, session-retention, kanban-board-health, kanban-block-recheck, chat-delivery-watch, stall-watch, upgrade-readiness-watch, upgrade-readiness-weekly-review, sa-role-watch, leeway-watch and feedback-prompt: the tick is a subprocess, not an LLM turn. The governance watchdogs and upgrade-readiness-weekly-brief omit it. |
script |
string | For a no_agent job, the script to run, resolved in that profile’s scripts/. The scheduler runs it with no arguments. On a prompt job it is a pre-run script: the scheduler runs it before the turn and puts its stdout above the prompt, or its error text under Script Error; empty stdout skips the turn. Only upgrade-readiness-weekly-brief has one, which reads the findings queue for a turn that holds no queue tool. |
enabled_toolsets |
array of string | The toolsets the run gets in place of the profile’s. Every enabled MCP server is added back unless the list names no_mcp, which drops them all; a server named in the list is kept. Only upgrade-readiness-weekly-brief sets it, to the terminal tool: its turn reads tenant-written names and holds no platform_control tool, so nothing a name says can make it register or decide a finding. |
enabled |
bool | Set false to disable without deleting the entry. See Disabling a watchdog — a deleted entry is not removed from a cluster that already has it. |
deliver |
string | Where the run’s outcome goes. "all" sends it to the configured target; "chat" posts it into a thread where a reply reaches the Planning Agent with the report attached; "local" resolves to no target at all and drops it. Every enabled job on the Platform Agent’s roster uses "chat" or "all", so a job that has stopped working is visible rather than indistinguishable from a quiet fleet. The one exception is chat-delivery-watch, which uses "local" because its product is a GitHub issue and a log line, and its purpose is to work when chat does not. |
Editing
Section titled “Editing”Adding or editing a job is a one-file change — see Adding a watchdog.
Edit jobs.json, then redeploy the agent image at the revision carrying the change:
./upgrade.sh --upgrade-mode=harness --image-tag=<SEMVER_TAG_OR_FULL_COMMIT_SHA>The change is picked up on the next pod restart.
How an edit reaches an existing pod
Section titled “How an edit reaches an existing pod”This part is about the Planning Agent’s file, agents/chat/defaults/cron/jobs.json — the one the start-up reconcile below acts on. The Platform Agent’s roster, which the rest of this page documents, reaches its profile by a separate path: profile_scaffold.py scaffolds it, and merge_cron_store merges it under the same per-key rule. An install’s own suspend setting then holds jobs off.
$HERMES_HOME/cron/jobs.json lives on the agent’s persistent volume, and the scheduler writes last_run back into it on every tick — so the volume’s copy is always newer than the image’s, and the entrypoint’s update-only defaults copy never overwrites it. Overwriting the file is not an option either. It would reset every last_run (making all jobs look due at once) and discard the chat binding first-run onboarding writes. It would also reinstate the two onboarding jobs that finishing onboarding deliberately removes, and oobe on an install that finished onboarding before it shipped.
So docker-entrypoint.sh runs cron_jobs_sync.py before the scheduler starts, merging the image’s declarations into the volume’s file by job id. The merge is per key, not per field-list: the image wins every key it ships, and every key it does not ship is left as the volume had it.
- A job’s definition —
name,schedule,prompt,skills,script,no_agent, andenabled— is shipped, so it tracks the image. Shippingenabled: falseis therefore the fleet-wide off switch described in Disabling a watchdog; the cost is that a job disabled by hand on a live pod is switched back on by the next image roll. - The scheduler’s own state —
last_runand whatever else Hermes records per job — is shipped by nothing, so it survives untouched. Stating the rule this way rather than as a list of runtime-owned names is deliberate: a list has to be complete to be correct, and it stops being complete the day upstream records a new field. deliveris the single exception, because a runtime hook owns it: onboarding rewrites it tooriginon the delivery job, and taking the image’s value back would send the report nowhere.- A job the image does not declare is never deleted; it may have been added by hand. Retirement therefore does not propagate to existing volumes — drop an id only once every live cluster has merged its disabled form.
- A job this script has installed before and that is now absent was removed on purpose, so it is not reinstalled. A ledger at
$HERMES_HOME/.cron_jobs_installedrecords which ids those are.
The same start-up reconcile applies to the specialist profiles’ skills/ directories, which are wholly image-owned and replaced from the baked template on every start — see Skills.