Skip to content

[Bug]: Cron scheduler starts but timer never fires — jobs never execute #10251

@Geno-Claw

Description

@Geno-Claw

Environment

  • OpenClaw version: 2026.2.3-1
  • OS: Ubuntu 22.04 (DigitalOcean)
  • Node: v22.22.0
  • Channel: Discord
  • Model: anthropic/claude-opus-4-6 (custom model via models.providers merge)

Description

The cron scheduler module starts correctly and calculates nextWakeAtMs, but the internal timer/interval never actually fires. Jobs accumulate nextRunAtMs timestamps that pass without execution. No run logs are written.

Steps to Reproduce

  1. Have multiple cron jobs configured (mix of isolated agentTurn and main systemEvent)
  2. Gateway starts, cron logs cron: started with correct nextWakeAtMs
  3. Wait past nextWakeAtMs — nothing happens
  4. Check run logs — empty, no entries after gateway start
  5. cron action=status shows nextWakeAtMs has advanced past the current time
  6. Full VPS reboot does not fix the issue

What I've Tried

  • SIGUSR1 restart (config.patch) — no fix
  • openclaw gateway restart — no fix
  • Full VPS reboot — no fix
  • Deleting and recreating the cron jobs — no fix
  • Created simple test jobs (* * * * *, every minute) — they also never fire
  • Manual sessions_spawn with identical payload — works perfectly
  • cron action=run — returns {ran: false, reason: 'not-due'} even when overdue

Evidence

Gateway log shows cron started:

{"module":"cron"} {enabled:true, jobs:10, nextWakeAtMs:1770365340000} "cron: started"

No further cron log entries after this. No tick, wake, fire, or error.

Cron status shows next wake in the past:

{"enabled": true, "jobs": 10, "nextWakeAtMs": 1770365340000}
// That timestamp is 08:09 UTC, current time is 08:12 UTC — already passed, nothing ran

Run logs are empty for newly created jobs:

$ cat ~/.openclaw/cron/runs/<new-job-id>.jsonl
// File doesn't exist — never created

Manual spawn with same payload works:

sessions_spawn(task="...", model="anthropic/claude-sonnet-4-5-20250514")
// Returns: {status: "accepted", childSessionKey: "..."}
// Executes successfully

Context

  • Cron jobs were working earlier today (have run logs proving successful executions)
  • Issue started after a config.patch that added a custom model definition via models.providers.anthropic.models[]
  • The config.patch triggered a SIGUSR1 restart
  • After that restart, no cron job has fired
  • The cron module initialises and calculates schedules, but the actual timer/setInterval never triggers
  • Other users reporting similar issues: reddit.com/r/AI_Agents ("scheduled task isn't running at the expected time" on 2026.2.x)

Expected Behavior

Cron jobs should fire at their scheduled times and execute their payloads.

Actual Behavior

Cron module starts, calculates next wake time, but the timer callback never executes. Jobs silently fail to run with no error output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions