Skip to content

Cron jobs not firing despite correct next wake time calculation #10490

@bostrovsky

Description

@bostrovsky

Environment

  • OpenClaw version: latest (installed via npm)
  • OS: macOS (Darwin 24.6.0 arm64)
  • Node: v25.6.0

Description

Cron jobs are created successfully and the scheduler calculates the correct next wake time, but jobs don't actually execute when the scheduled time arrives.

Steps to Reproduce

  1. Create a cron job with kind: 'at' for a specific time (e.g., 5 minutes in the future)
  2. Verify job is created with cron list
  3. Wait for scheduled time
  4. Job never fires

Expected Behavior

Job should execute at the scheduled time.

Actual Behavior

Job shows correct nextAt timestamp but never executes. Gateway continues running without crashes or errors.

Workaround

Using heartbeat-based scheduling with state tracking in files as an alternative. Heartbeats fire reliably.

Additional Context

  • Gateway was running continuously (no restarts)
  • Multiple job types tested (at, every)
  • Both systemEvent and agentTurn payloads tested
  • cron status shows scheduler as active

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