Skip to content

Cron jobs reschedule but never execute #10279

@Quenos

Description

@Quenos

Version: 2026.2.3-1

Description:
Cron scheduler runs and updates nextRunAtMs correctly, but jobs never actually execute. The Last field always shows - and run history is empty.

Steps to reproduce:

  1. Create a cron job: openclaw cron add --name test --every 60000 --session main --system-event "test" --wake now
  2. Wait for next scheduled time
  3. Check runs: openclaw cron runs --id → empty
  4. Observe nextRunAtMs keeps advancing but job never fires
    Observed:

• Timer advances correctly (nextRunAtMs updates)
• No execution logs in gateway logs
• openclaw cron run --force hangs indefinitely
• Tool call cron.run returns {"ran": false, "reason": "not-due"} even when past due
Expected:
Jobs should execute at scheduled time.

Logs:

cron: started
nextWakeAtMs: 1770367573127No execution entries follow.

Workaround:
Use OpenClaw's built-in heartbeat system instead of cron jobs:

  1. Set heartbeat interval in config (e.g., agents.defaults.heartbeat.intervalMs)
  2. Create HEARTBEAT.md in workspace with tasks to check
  3. Agent receives heartbeat prompt periodically and processes the file
# openclaw.json
"agents": {
  "defaults": {
    "heartbeat": {
      "intervalMs": 1800000  # 30 min
    }
  }
}

This works reliably while cron does not.

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