{"record":{"id":"851a2eed862f7b51","repo":"zeroclaw-labs/zeroclaw","slug":"cron-job-job-id-shell-output-format-is-shell","errorCode":null,"errorMessage":"Cron job '{job_id}': shell_output_format is shell-only and cannot be set on a '{job_type}' job","messagePattern":"Cron job '(.+?)': shell_output_format is shell-only and cannot be set on a '(.+?)' job","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-runtime/src/cron/store.rs","lineNumber":549,"sourceCode":"    }\n    if let Some(uses_memory) = patch.uses_memory {\n        job.uses_memory = uses_memory;\n    }\n    if let Some(shell_output_format) = patch.shell_output_format {\n        // Config-owned (declarative) and non-shell (agent) jobs never store\n        // this field: the gateway API already rejects both cases, but this\n        // is the core boundary every caller of `update_job` goes through,\n        // so it must reject them too rather than silently ignoring or\n        // persisting a value execution never consumes.\n        if job.source == \"declarative\" {\n            anyhow::bail!(\n                \"Cron job '{job_id}': shell_output_format is owned by config.toml for a \\\n                 declarative job, not the database\"\n            );\n        }\n        if job.job_type != JobType::Shell {\n            let job_type: &str = job.job_type.into();\n            anyhow::bail!(\n                \"Cron job '{job_id}': shell_output_format is shell-only and cannot be set on a '{job_type}' job\"\n            );\n        }\n        job.shell_output_format = shell_output_format;\n    }\n\n    if schedule_changed {\n        job.next_run = next_run_for_schedule(&job.schedule, Utc::now())?;\n    }\n\n    with_initialized_connection(config, |conn| {\n        // Declarative jobs don't own `shell_output_format` — the config is the\n        // canonical source, and `resolve_declarative_shell_output_format()` overlays\n        // it on every read. Writing the synthesized (Wrapped) value back into the\n        // column during an unrelated patch would overwrite whatever was stored\n        // there (NULL, garbage, or a future value) with a value the DB doesn't\n        // own. Omit the column from the UPDATE for declarative rows so the\n        // non-owned shadow stays untouched.","sourceCodeStart":531,"sourceCodeEnd":567,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-runtime/src/cron/store.rs#L531-L567","documentation":"Error \"Cron job '{job_id}': shell_output_format is shell-only and cannot be set on a '{job_type}' job\" thrown in zeroclaw-labs/zeroclaw.","triggerScenarios":"Thrown at crates/zeroclaw-runtime/src/cron/store.rs:549 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Only set shell_output_format on shell-type cron jobs."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}