Skip to content

Bug: Cron Scheduler Memory Desync - Jobs persist on disk but fail to load #9236

@leeoxi82

Description

@leeoxi82

Description

The internal Cron scheduler exhibits a "Memory Amnesia" bug where it fails to load multiple jobs from jobs.json into the active memory state. While jobs are correctly persisted to disk via cron.add, the runtime scheduler (and cron.list) often only reflects a single job (typically the first one), causing subsequent scheduled tasks to fail silently.

Reproduction Steps

  1. Use cron.add to create Job A.
  2. Use cron.add to create Job B.
  3. Verify persistence: cat ~/.openclaw/cron/jobs.json shows both A and B.
  4. Verify memory: Run cron.list. Result: Only Job A is shown.
  5. Wait for Job B's trigger time. Result: Job B does not fire.

Expected Behavior

All jobs present in jobs.json should be loaded into the scheduler memory upon creation or Gateway restart.

Environment

  • OS: macOS (Darwin 25.2.0)
  • OpenClaw Version: 2026.2.1 (ed4529e)
  • Node: v25.5.0

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