Skip to content

Cron 'every' schedule not advancing nextRunAtMs after gateway restart #29690

@forvendettaw

Description

@forvendettaw

Description

Cron jobs with schedule kind 'every' (e.g., 'every 1h') fail to advance nextRunAtMs after gateway restart.

Steps to reproduce

  1. Create a cron job with schedule kind 'every' (e.g., every 1h)
  2. Let it run normally
  3. Restart the gateway
  4. Observe that nextRunAtMs is not updated after restart

Expected behavior

After gateway restart, the cron timer should be re-armed and nextRunAtMs should advance correctly.

Actual behavior

  • After restart, missed jobs run via 'running missed jobs after restart' mechanism
  • But timer is not re-armed: log shows "armTimer skipped - no jobs with nextRunAtMs"
  • nextRunAtMs stays at the old value and never advances

Evidence from logs

{"module":"cron"} cron: running missed jobs after restart
{"module":"cron"} cron: armTimer skipped - no jobs with nextRunAtMs
{"module":"cron"} cron: started

Environment

  • OpenClaw: 2026.2.24
  • macOS: 26.2 (arm64)
  • Node: 25.6.1

Affected jobs

  • X_Deep_Miner_Hourly (every 1h)
  • SmallCap_Scanner_Hourly (every 1h)

Workaround

Rebuilding the cron task resets the anchor and fixes the issue temporarily.

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleMarked as stale due to inactivity

    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