Skip to content

Cron scheduler: nextWakeAtMs always null, jobs never execute #7879

@unchainedio

Description

@unchainedio

Bug Description

The cron scheduler starts but never calculates nextWakeAtMs, causing all scheduled jobs to never run.

Environment

  • OpenClaw version: 2026.2.1 (git: 1ee57cf, also tested on b37626c)
  • OS: Ubuntu 22.04 LTS
  • Node: v22.22.0
  • Install method: git clone

Current Behavior

cron.status shows nextWakeAtMs: null — the scheduler starts but never calculates wake times:

$ openclaw cron status
{
  "enabled": true,
  "storePath": "/home/moltbot/.openclaw/cron/jobs.json",
  "jobs": 6,
  "nextWakeAtMs": null
}

Log output:

{"module":"cron",...} {"enabled":true,"jobs":6,"nextWakeAtMs":null} "cron: started"

Jobs Configured

  • 2x every interval jobs (5 min)
  • 2x cron expression jobs (daily at 8am/9am Cairo)
  • 1x test every job (60 sec)
  • 1x test cron job

All show in list, none execute.

Steps Tried

  1. Added explicit cron section to config
  2. Restarted gateway multiple times
  3. Removed & re-added jobs
  4. Updated to latest git (was 68 commits behind)
  5. Added simple every interval test job — still null
  6. Tried cron.wake with mode: now — no effect

Expected Behavior

nextWakeAtMs should calculate the next execution time based on job schedules.

Impact

All 6 cron jobs non-functional for ~2+ days. No daily backups, no scheduled updates.

Workaround

Using system crontab as fallback.

Related

Possibly related to #4862

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions