zeroclaw-labs/zeroclaw · error · anyhow::Error
Cron job '{job_id}' not found
Error message
Cron job '{job_id}' not found What it means
Error "Cron job '{job_id}' not found" thrown in zeroclaw-labs/zeroclaw.
Source
Thrown at crates/zeroclaw-runtime/src/cron/store.rs:249
/// on the returned job is exactly what's stored in the `cron_jobs` column —
/// for a declarative job that is a stale/default value, not the canonical
/// one from `config.cron`. Used by [`update_job`] so unrelated patches don't
/// re-persist a config-resolved snapshot into a column declarative jobs
/// don't own; every other caller should use [`get_job`] instead.
fn get_job_raw(config: &Config, job_id: &str) -> Result<CronJob> {
let Some(job) = with_read_connection(config, |conn| {
let mut stmt = conn.prepare(
"SELECT id, expression, command, schedule, job_type, prompt, name, session_target, model,
enabled, delivery, delete_after_run, created_at, next_run, last_run, last_status, last_output,
allowed_tools, source, uses_memory, agent_alias, shell_output_format
FROM cron_jobs WHERE id = ?1",
)?;
let mut rows = stmt.query(params![job_id])?;
if let Some(row) = rows.next()? {
map_cron_job_row(row).map_err(Into::into)
} else {
anyhow::bail!("Cron job '{job_id}' not found")
}
})?
else {
anyhow::bail!("Cron job '{job_id}' not found")
};
Ok(job)
}
pub fn resolve_job_id_or_name(
config: &Config,
id_or_name: &str,
agent_alias: &str,
) -> Result<String> {
// Fast path: try exact ID lookup first.
if let Ok(job) = get_job(config, id_or_name) {
return Ok(job.id);
}
View on GitHub (pinned to 88bb9c8533)
Solutions
- List cron jobs to find the correct job ID and retry.
When it happens
Trigger: Thrown at crates/zeroclaw-runtime/src/cron/store.rs:249 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23).
Data as JSON: /api/errors/e2045f6e4955ea5a.
Report an issue: GitHub.