-
-
Notifications
You must be signed in to change notification settings - Fork 52.8k
Closed
Description
Bug Description
The cron scheduler detects due jobs and advances their nextRunAtMs timestamp, but fails to actually execute/spawn the job sessions.
Environment
- OpenClaw version: 2026.2.3-1
- OS: macOS (Darwin 24.5.0 arm64)
- Node: v25.5.0
Steps to Reproduce
- Create a cron job with
schedule.kind: 'every'and short interval (e.g., 60000ms) - Wait for the job to become due
- Observe that
nextRunAtMsadvances by the interval - But
lastRunAtMsnever updates - job never executes
Evidence
Test Job (1 min interval):
- Created at: 1770404809447
- First nextRunAtMs: 1770408960009
- After due time passed: 1770409020006 (+60 sec)
- lastRunAtMs: undefined (never ran!)
Position Monitor (2 min interval):
- nextRunAtMs before: 1770408960000
- nextRunAtMs after: 1770409080000 (+120 sec)
- lastRunAtMs: unchanged from hours ago
Expected Behavior
When a job's nextRunAtMs is reached, the scheduler should:
- Execute the job (spawn session)
- Update
lastRunAtMswith execution time - Then advance
nextRunAtMs
Actual Behavior
Scheduler skips step 1 and 2, only advances nextRunAtMs.
Workaround
Manual sessions_spawn works fine. Only the automatic cron scheduler loop is affected.
Additional Context
cron statusshowsenabled: truewith correct job countcron run <jobId>returns{ran: false, reason: 'not-due'}even when overduecron wakedoesn't fix it- Gateway restart doesn't fix it
- Jobs with explicit
modelin payload are affected - Both new jobs (Test Job) and existing jobs show same behavior
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels