claude-code - 💡(How to fix) Fix [Bug] Scheduled agent runs delayed 20-150+ minutes past cron trigger time [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
anthropics/claude-code#52116Fetched 2026-04-23 07:36:13
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×3commented ×1

Fix Action

Fix / Workaround

Bug Description

Title: Scheduled agent runs starting 30–40+ min after cron time

Summary: My scheduled trigger field-guardian (id trig_018G3wzNgKrDLfxYjmzeTe5o, cron 0 14 * * *) has been starting well after the scheduled UTC minute.

Evidence:

  • 2026-04-22: scheduled 14:00 UTC, UI shows run start at 14:38 UTC (38 min slip). Commit landed at 14:42 UTC, so agent execution itself was only ~4 min — the entire delay is pre-run queue time.
  • 2026-04-20: agent commits at 16:24 and 16:30 UTC for a 14:00 UTC cron (>2 hr slip).
  • 2026-04-21: commit at 14:22 UTC (~22 min slip).
  • next_run_at in the trigger API reports 14:02:57Z — so the API advertises ~3 min of jitter, but actual dispatch is much
    later.

Expected: Runs dispatch within a minute or two of the cron time.

Actual: 20–150 min slip on consecutive days.

Impact: Daily reports to end-users arrive unpredictably late. Time-sensitive actions (e.g. weather-dependent
recommendations) lose relevance.

Suspect: Contention on :00 cron minute — many users schedule at the top of the hour.

Trigger management URL: https://claude.ai/code/scheduled/trig_018G3wzNgKrDLfxYjmzeTe5o

Code Example

[]
RAW_BUFFERClick to expand / collapse

Bug Description

Title: Scheduled agent runs starting 30–40+ min after cron time

Summary: My scheduled trigger field-guardian (id trig_018G3wzNgKrDLfxYjmzeTe5o, cron 0 14 * * *) has been starting well after the scheduled UTC minute.

Evidence:

  • 2026-04-22: scheduled 14:00 UTC, UI shows run start at 14:38 UTC (38 min slip). Commit landed at 14:42 UTC, so agent execution itself was only ~4 min — the entire delay is pre-run queue time.
  • 2026-04-20: agent commits at 16:24 and 16:30 UTC for a 14:00 UTC cron (>2 hr slip).
  • 2026-04-21: commit at 14:22 UTC (~22 min slip).
  • next_run_at in the trigger API reports 14:02:57Z — so the API advertises ~3 min of jitter, but actual dispatch is much
    later.

Expected: Runs dispatch within a minute or two of the cron time.

Actual: 20–150 min slip on consecutive days.

Impact: Daily reports to end-users arrive unpredictably late. Time-sensitive actions (e.g. weather-dependent
recommendations) lose relevance.

Suspect: Contention on :00 cron minute — many users schedule at the top of the hour.

Trigger management URL: https://claude.ai/code/scheduled/trig_018G3wzNgKrDLfxYjmzeTe5o

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 2.1.117
  • Feedback ID: 36632597-9288-42c7-b00c-ea535fa6b989

Errors

[]

extent analysis

TL;DR

Consider adjusting the cron schedule to a non-zero minute to reduce contention and potential delays.

Guidance

  • Review the cron schedule configuration to identify potential contention points, such as multiple triggers set to run at the top of the hour.
  • Verify the next_run_at value in the trigger API to ensure it aligns with the expected run time.
  • Experiment with adjusting the cron schedule to a non-zero minute (e.g., 0 14 * * * becomes 1 14 * * *) to reduce potential delays.
  • Monitor the run times after adjusting the schedule to determine if the issue is resolved.

Example

No code snippet is provided as it is not necessary for this issue.

Notes

The issue may be related to contention on the :00 cron minute, but without further information, it's difficult to determine the root cause. Adjusting the cron schedule is a potential workaround to reduce delays.

Recommendation

Apply workaround: Adjust the cron schedule to a non-zero minute to reduce potential contention and delays. This is a simple and non-invasive change that may resolve 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