Safeguard
Developer Tools•

Why does my scheduled AI task or CI job start late?

Vendors shift or delay scheduled runs on purpose. How jitter works in Claude Code, routines and GitHub Actions, and how to design around it.

Safeguard Security Team
7 min read

Because vendors spread load on purpose. Claude Code shifts recurring loop runs late by up to half the gap to the next run, capped at 30 minutes. Routines on the hour can start several minutes late, and GitHub warns scheduled workflows can be delayed or dropped under heavy load.

The documented behaviors

Read on 19 October 2026:

SystemBehavior
Claude Code session loopsRecurring runs start late by up to half the gap to the next run, at most 30 minutes. A five minute schedule is not delayed and starts 15 seconds sooner. One-shot tasks on the hour or half hour can run up to 90 seconds early.
Claude Code routinesA run exactly on the hour can start several minutes late. The minimum interval is one hour.
Claude Code Desktop tasksA small deterministic delay of a few minutes after the scheduled time.
GitHub Actions scheduleRuns can be delayed during high load, especially at the start of each hour. Under heavy load some queued jobs may be dropped. Shortest interval is five minutes, and schedules run on the default branch.
Gemini scheduled actionsGemini prepares each response within the hour before the delivery time, so it suits daily summaries more than fast changing data.

The Claude Code page explains the reason: if every session's tasks ran exactly on schedule, many would hit the API at the same moment.

Why it matters for security work

  • A task meant to run "just after the release" may run before or well after it.
  • Two scheduled jobs that depend on order, such as a scan then a triage task, can invert.
  • A freshness claim in a report may be wrong if the data was gathered long before the stated time.
  • A dropped CI job leaves a gap that looks like a quiet night.

Design rules

  1. Do not use schedules as timers. If sequence matters, make the second job start from the first one's completion, with an event or an API call.
  2. Pick off-peak minutes. Use 9:07, not 9:00. Both Anthropic and GitHub recommend this.
  3. Record the data window. Have the task state the time range it covers and store the last success time.
  4. Alert on absence. A missed run should page someone, not pass unnoticed. See silently stopped scans on GitHub Actions.
  5. Check time zones. GitHub schedules use UTC by default and allow an IANA zone. Claude Code interprets cron times in your local zone. Mixing them causes off by hours errors, especially around daylight saving changes.
  6. Keep prompts self correcting. "If this is later than expected, say so before acting" costs one sentence.

When exact timing matters

Use infrastructure meant for it, such as a job scheduler you operate, an event from the system that finished, or a deployment pipeline step. Keep the AI task for the interpretation work after the trigger arrives.

Worked example: a scan, then a summary

A team has two scheduled jobs. A CI workflow runs a dependency scan at 06:00 UTC. A scheduled assistant task, set for 06:15 local time, reads the scan results and posts a summary to the team channel. On the first day it works. On the second day GitHub is under load and the workflow starts at 06:21. The assistant task, with its own scheduling shift of up to several minutes, starts at 06:19 and summarizes yesterday's results without saying so. The channel gets a confident, wrong report.

Three things combined: two different time zones, delay on one side, jitter on the other, and no dependency between them.

The fix, step by step

  1. Remove the clock dependence. Have the workflow call the assistant task when it finishes, for example through an API trigger on a routine, or have the assistant task wait for a file with the new run's identifier. If your product lets you trigger a task from an event, use that rather than a second schedule.
  2. Make the summary check freshness. The prompt says: "Read the scan timestamp. If it is older than three hours, report that the scan has not completed and stop."
  3. Put the run identifier in the output. A summary that names the scan run it covers cannot be mistaken for another.
  4. Align time zones in writing. Note the zone for each schedule in the register. GitHub uses UTC by default and allows an IANA zone, and Claude Code interprets cron expressions in local time.
  5. Alert on missing results. If no summary appears by 08:00, notify the owner.

Delay budget table

Source of delaySize, as documentedMitigation
Loop jitter, recurringUp to half the interval, capped at 30 minutesDo not depend on exact start
Loop one shot on the hourUp to 90 seconds earlyPick an off minute
Routine on the hourSeveral minutes latePick a minute past
Desktop taskA few minutes, deterministicAllow for it
CI schedule under loadDelays, and some jobs may be droppedAlert on absence
Gemini scheduled actionPrepared within the hour before deliveryUse for daily summaries

Daylight saving and other traps

A local time schedule moves relative to UTC when clocks change. A job at 02:30 local time may run twice or not at all on transition days. Avoid scheduling in the changeover hour, or schedule in UTC and convert in your head. Also watch month end: cron expressions that name day 31 do not run in shorter months. Test the schedule by listing the next run times that the tool reports, such as the next run column in Claude Code's task list.

When delays are harmless

A weekly summary delayed by twenty minutes is fine. Do not over engineer. The goal is to avoid designs where correctness depends on two clocks agreeing.

Try it yourself

Click through it at your own pace, or open it full screen.

Watch how a recurring check shows what changed since the last run, and think about how your own jobs would show a delay or a gap.

Quick check

Is a five minute loop delayed?

Per the Claude Code page, no. A five minute schedule starts 15 seconds sooner than the interval to keep the prompt cache warm.

What is the safest minute to schedule a job?

Anything off the hour and half hour, such as 7 or 37 minutes past, to avoid peak load.

Does a missed scheduled run get retried?

It depends on the system. Claude Code loops fire once when idle and do not replay misses. GitHub says queued jobs may be dropped under heavy load. Build your own alert for absence.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.