-
-
Notifications
You must be signed in to change notification settings - Fork 52.7k
Closed
Description
Summary
When adding a new one-time at cron job, the scheduler's nextWakeAtMs is not recalculated. If the new job's scheduled time is sooner than the current next wake, the job will be skipped entirely.
Repro Steps
- At 7:00 PM, create two one-time
atjobs scheduled for 1:00 AM and 2:00 AM - Verify jobs are created successfully (they appear in
cron list) - Wait until after 2:00 AM
- Check job state — jobs have empty state (
{}), never ran cron statusshowsnextWakeAtMsjumped to 7:00 AM (the next recurring cron), skipping the 1am/2am jobs
Expected Behavior
When a new at job is added, if its atMs is sooner than the current nextWakeAtMs, the scheduler should update its wake time to fire for the new job.
Actual Behavior
The scheduler's nextWakeAtMs is not updated when new jobs are added. One-time at jobs scheduled between now and the next recurring cron are silently skipped.
Additional Notes
- Manual
cron runon the missed jobs returns{"ran": false, "reason": "not-due"}because the time has passed - Jobs remain in the list with empty state indefinitely
- This affects the Evening Build Planning workflow where overnight build tasks are approved and scheduled for 1-2am
Environment
- OpenClaw version: 2026.2.2-3
- macOS (arm64)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels