-
-
Notifications
You must be signed in to change notification settings - Fork 39.7k
Closed
Description
Problem
When the gateway is down during a scheduled cron run, the job is silently skipped. On restart, the scheduler just sets nextRunAtMs to the next occurrence without executing the missed run or logging that it was skipped.
Observed behavior
- Gateway down at 8:00 AM when Morning Briefing cron was scheduled
- Gateway restarts at 1:00 PM
- Scheduler sees 8:00 AM has passed, sets next run to tomorrow 8:00 AM
- No indication the run was missed —
lastStatusstill shows "ok" from prior day - User sees empty Discord channels and thinks crons are broken
Expected behavior
Option A: Catch-up mode — If a cron scheduled time was missed by < X hours (configurable), run it immediately on startup
Option B: Missed run logging — At minimum, log that scheduled runs were skipped during downtime and set lastStatus: "skipped" with reason
Option C: Both — Catch up for time-sensitive jobs, log for all
Suggested implementation
schedule:
kind: cron
expr: "0 8 * * *"
catchUp: true # Run if missed within window
catchUpWindowMs: 3600000 # 1 hour grace periodImpact
Users relying on daily briefings, monitors, or time-sensitive scans get no output and no indication why. Debugging requires comparing lastRunAtMs timestamps manually to realize runs were skipped.
Environment
- OpenClaw 2026.2.3-1
- 22 cron jobs configured
- Gateway runs as systemd user service
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels