{"record":{"id":"024785769646fa2b","repo":"zeroclaw-labs/zeroclaw","slug":"no-cron-job-found-with-id-or-name-id-or-name","errorCode":null,"errorMessage":"No cron job found with id or name '{id_or_name}'","messagePattern":"No cron job found with id or name '(.+?)'","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-runtime/src/cron/store.rs","lineNumber":277,"sourceCode":"    config: &Config,\n    id_or_name: &str,\n    agent_alias: &str,\n) -> Result<String> {\n    // Fast path: try exact ID lookup first.\n    if let Ok(job) = get_job(config, id_or_name) {\n        return Ok(job.id);\n    }\n\n    // Fallback: search by name within the requesting agent's own jobs.\n    let jobs = list_jobs_by_agent(config, agent_alias)?;\n    let lower = id_or_name.to_lowercase();\n    let matches: Vec<&CronJob> = jobs\n        .iter()\n        .filter(|j| j.name.as_deref().is_some_and(|n| n.to_lowercase() == lower))\n        .collect();\n\n    match matches.len() {\n        0 => anyhow::bail!(\"No cron job found with id or name '{id_or_name}'\"),\n        1 => Ok(matches[0].id.clone()),\n        n => anyhow::bail!(\n            \"Ambiguous name '{id_or_name}': matched {n} jobs — use the job ID instead\"\n        ),\n    }\n}\n\npub fn remove_job(config: &Config, id: &str) -> Result<()> {\n    let changed = with_initialized_connection(config, |conn| {\n        conn.execute(\"DELETE FROM cron_jobs WHERE id = ?1\", params![id])\n            .context(\"Failed to delete cron job\")\n    })?;\n\n    if changed == 0 {\n        anyhow::bail!(\"Cron job '{id}' not found\");\n    }\n\n    ::zeroclaw_log::record!(","sourceCodeStart":259,"sourceCodeEnd":295,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-runtime/src/cron/store.rs#L259-L295","documentation":"Lookup failure in resolve_job_id_or_name: the input matched neither a job id (exact lookup fast path) nor the name of any job owned by the requesting agent. Name search is deliberately scoped to the agent's own jobs, so another agent's job name resolves the same way an unknown one does.","triggerScenarios":"Thrown at crates/zeroclaw-runtime/src/cron/store.rs:277 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the job ID or name spelling; list existing cron jobs to find it."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","contentChangedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}