claude-code - 💡(How to fix) Fix [FEATURE] Add skip-if-missed option for recurring scheduled tasks

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…
RAW_BUFFERClick to expand / collapse

When the Claude Desktop app is closed or offline during a scheduled task's cron time, all missed runs fire simultaneously when the app comes back online. This creates "catch-up flooding" where multiple hours' worth of tasks execute at once — producing duplicate or stale results.

For example, three email triage tasks scheduled at 9 AM, 1 PM, and 6 PM all fired at 6:26 AM when the app launched, producing nearly identical briefings.

Request: Add an optional skipIfMissed: true parameter that drops any run whose scheduled time has already passed by more than N minutes (configurable, default perhaps 30). This would prevent catch-up flooding while still allowing brief delays (e.g., app restarting).

Reference: Similar to cron's RANDOM_DELAY and anacron's behavior. GitHub issue #50619 also documents this catch-up flooding behavior.

extent analysis

TL;DR

Implementing an optional skipIfMissed parameter with a configurable time threshold can help prevent "catch-up flooding" by dropping missed runs that are older than a specified duration.

Guidance

  • Introduce a new parameter skipIfMissed with a default value of true and a configurable time threshold (e.g., 30 minutes) to control when missed runs are skipped.
  • Update the scheduling logic to check if a run's scheduled time has passed by more than the configured threshold, and skip it if skipIfMissed is true.
  • Consider adding a mechanism to notify or log skipped runs to ensure awareness of potentially missed tasks.
  • Review similar implementations, such as cron's RANDOM_DELAY and anacron's behavior, to inform the design of the skipIfMissed feature.

Example

// Pseudo-code example of the updated scheduling logic
if (skipIfMissed && (current_time - scheduled_time) > threshold) {
  // Skip the missed run
  logSkippedRun(task);
} else {
  // Execute the task
  executeTask(task);
}

Notes

The proposed solution assumes that the scheduling system has access to the current time and the scheduled time of each task. The implementation details may vary depending on the specific technology stack and requirements.

Recommendation

Apply the workaround by implementing the skipIfMissed parameter, as it provides a flexible and configurable solution to prevent catch-up flooding while allowing for brief delays.

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

claude-code - 💡(How to fix) Fix [FEATURE] Add skip-if-missed option for recurring scheduled tasks