openclaw - 💡(How to fix) Fix Feature Request: Add option to disable missed jobs catch-up on gateway restart [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#73643Fetched 2026-04-29 06:17:03
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Timeline (top)
cross-referenced ×2commented ×1

Environment: macOS (Darwin 23.4.0), OpenClaw 2026.4.25, running as LaunchAgent. Gateway restart at 22:10 triggered 5 missed A股 monitoring crons that were supposed to run at 11:00-11:24, resulting in after-hours notifications to the user.

See relevant code in server.impl-C1dgKTkE.js:

  • runMissedJobs() at line ~4143
  • missedJobStaggerMs at line ~4238 (currently hardcoded to 5s stagger)
  • DEFAULT_MISSED_JOB_STAGGER_MS = 5e3 at line ~3561

Root Cause

Environment: macOS (Darwin 23.4.0), OpenClaw 2026.4.25, running as LaunchAgent. Gateway restart at 22:10 triggered 5 missed A股 monitoring crons that were supposed to run at 11:00-11:24, resulting in after-hours notifications to the user.

See relevant code in server.impl-C1dgKTkE.js:

  • runMissedJobs() at line ~4143
  • missedJobStaggerMs at line ~4238 (currently hardcoded to 5s stagger)
  • DEFAULT_MISSED_JOB_STAGGER_MS = 5e3 at line ~3561

Code Example

{
  "cron": {
    "runMissedJobs": false
  }
}

---

{
  "cronMissedPolicy": "skip" | "run" | "staggered"
}
RAW_BUFFERClick to expand / collapse

Problem

When the OpenClaw gateway restarts (e.g. after a crash or manual restart), it automatically runs all missed cron jobs that were scheduled during the downtime. This happens regardless of whether those jobs are still relevant — for example, A股 trading monitoring crons that were supposed to run at 11:00am fire at 10pm after a 22:00 restart.

This causes noise and confusion, especially for:

  • Market monitoring crons (触发 at wrong times outside trading hours)
  • Scripts that send notifications (users receive irrelevant alerts)
  • Short-duration monitoring jobs where catching up is meaningless

Proposed Solution

Add a per-cron or global option to disable the missed jobs catch-up behavior. For example:

Option A: Global config

{
  "cron": {
    "runMissedJobs": false
  }
}

Option B: Per-cron flag

{
  "cronMissedPolicy": "skip" | "run" | "staggered"
}

Option C: Time-window aware catch-up Only catch up if the missed run time is within a configurable window (e.g. last 30 minutes).

Context

Environment: macOS (Darwin 23.4.0), OpenClaw 2026.4.25, running as LaunchAgent. Gateway restart at 22:10 triggered 5 missed A股 monitoring crons that were supposed to run at 11:00-11:24, resulting in after-hours notifications to the user.

See relevant code in server.impl-C1dgKTkE.js:

  • runMissedJobs() at line ~4143
  • missedJobStaggerMs at line ~4238 (currently hardcoded to 5s stagger)
  • DEFAULT_MISSED_JOB_STAGGER_MS = 5e3 at line ~3561

Priority

Medium — this is a UX improvement rather than a bug, but it significantly impacts user trust in the cron system.

extent analysis

TL;DR

Implementing a configurable option to control the catch-up behavior of missed cron jobs after an OpenClaw gateway restart is likely to fix the issue.

Guidance

  • Review the proposed solution options (global config, per-cron flag, time-window aware catch-up) and choose the one that best fits the requirements.
  • Investigate the runMissedJobs() function at line ~4143 in server.impl-C1dgKTkE.js to understand the current implementation and potential modifications.
  • Consider adding a configurable time window to determine whether a missed job should be run, to prevent notifications outside trading hours.
  • Evaluate the impact of changing the missedJobStaggerMs value or making it configurable to stagger the execution of missed jobs.

Example

{
  "cron": {
    "runMissedJobs": false,
    "missedJobCatchupWindow": 30 // minutes
  }
}

Notes

The solution may require additional considerations, such as handling jobs that were missed due to a prolonged downtime or ensuring that the catch-up behavior does not overload the system.

Recommendation

Apply a workaround by implementing a global config option to disable the missed jobs catch-up behavior, as it is a simpler solution that can be implemented quickly to mitigate the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Feature Request: Add option to disable missed jobs catch-up on gateway restart [1 comments, 2 participants]