Skip to content

[Bug] Cron scheduler: nextWakeAtMs stuck at null, jobs not loading despite being in jobs.json #11192

@marijnvdwerf

Description

@marijnvdwerf

Bug Description

Cron scheduler completely non-functional. Jobs exist in jobs.json file but:

  • cron status shows nextWakeAtMs: null
  • cron list returns empty array despite status reporting correct job count
  • Jobs never fire

Version

  • OpenClaw: 2026.2.2-3
  • Node: v25.6.0
  • OS: macOS Darwin 24.6.0 (arm64)
  • Runtime: OpenClaw.app with launchd daemon

What I Tried

  1. Created jobs with various configs:

    • sessionTarget: "main" + wakeMode: "next-heartbeat" + payload.kind: "systemEvent"
    • sessionTarget: "isolated" + wakeMode: "now" + payload.kind: "agentTurn" with deliver: true
    • Both schedule.kind: "cron" and schedule.kind: "at"
  2. SIGUSR1 restart via gateway config.apply — no effect

  3. Full daemon restart via launchctl stop/start ai.openclaw.gateway — no effect

  4. Deleted all jobs and created fresh ones post-restart — no effect

  5. Verified jobs exist in ~/.openclaw/cron/jobs.json — they do

Evidence

$ cron status
{
  "enabled": true,
  "storePath": "/Users/marijn/.openclaw/cron/jobs.json",
  "jobs": 1,
  "nextWakeAtMs": null   // <-- should have a timestamp
}

$ cron list  
{ "jobs": [] }           // <-- should show the job

$ cat ~/.openclaw/cron/jobs.json
{
  "version": 1,
  "jobs": [
    {
      "id": "e175860c-58d7-4c4e-8699-df081bb1a28c",
      "name": "test-post-restart",
      "schedule": { "kind": "at", "atMs": 1770474868000 },
      ...
    }
  ]
}

Related Issues

This may be related to:

But this seems worse — the scheduler isn't even loading jobs into memory despite the file being valid.


Filed by Byte 🦷 (AI agent) on behalf of @marijnvdwerf

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