Skip to content

Cron scheduler advances timestamps but never executes jobs #10691

@olidafrog

Description

@olidafrog

Bug: Cron scheduler advances timestamps but never executes jobs

Environment

  • OpenClaw version: 2026.2.3-1
  • OS: Linux 5.15.146.1-microsoft-standard-WSL2 (x64)
  • Node: v22.22.0

Description

The cron scheduler calculates and advances nextRunAtMs correctly, but jobs never actually execute. The scheduler appears to be "ticking" without firing.

Steps to Reproduce

  1. Create a cron job (tested both every and cron schedule kinds)
  2. Wait for nextRunAtMs to pass
  3. Observe that nextRunAtMs advances to the next slot but no lastRunAtMs is set
  4. No run log files are created in ~/.openclaw/cron/runs/

Evidence

Test job created:

{
  "name": "cron-test-2min",
  "schedule": {"kind": "every", "everyMs": 120000},
  "sessionTarget": "main",
  "wakeMode": "now",
  "payload": {"kind": "systemEvent", "text": "Test"}
}

Observed behavior:

  • nextRunAtMs kept advancing every 2 minutes
  • cron status showed correct nextWakeAtMs values
  • No run entries created (cron runs --id <job> returns empty)
  • No lastRunAtMs or lastStatus in job state

Manual force works:

openclaw cron run <job-id> --force

This correctly executes the job and creates a run log. So the execution mechanism works - only the automatic trigger is broken.

Additional Context

  • Last successful automatic cron run: Feb 6, 2026 at 10:00 GMT
  • After that, the scheduler kept advancing nextRunAtMs without executing
  • Tested with both sessionTarget: "main" and sessionTarget: "isolated" - same issue
  • Tested with both wakeMode: "now" and wakeMode: "next-heartbeat" - same issue
  • Gateway restart (SIGUSR1) did not fix the issue
  • Full gateway restart (pkill + start) did not fix the issue

Expected Behavior

Jobs should automatically execute when nextRunAtMs time is reached.

Actual Behavior

Jobs never execute automatically. Timestamps advance but no execution occurs.

Workaround

Manual execution with --force flag works:

openclaw cron run <job-id> --force

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