Routines: hourly cron minute is silently rewritten to the save-time minute (undocumented)
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report
- [x] I am using the latest version of Claude Code
What's Wrong?
When a Routine's cron is set to an hourly schedule, the stored cron_expression has its
minute field silently overwritten with the minute-of-day at which the routine was saved,
instead of the value I specified.
Concretely: saving cron_expression = "0 * * * *" at 05:46 results in the trigger storing46 * * * *, and next_run_at becomes the next :46 (e.g. 06:46). Re-saving at a different
minute changes the run minute again — so the effective schedule tracks when I last saved,
not what I entered. There is no way to pin an hourly Routine to a specific minute (e.g. :00).
What Should Happen?
The stored cron should preserve the minute I entered (0 * * * * → runs near :00 each hour).
A small documented stagger is fine, but it should not rewrite the cron's minute field, and it
should be possible to target a specific minute (or the docs should state that exact-minute
scheduling is unsupported for Routines).
Error Messages/Logs
# sent
cron_expression: "0 * * * *"
# stored back (saved at 05:46)
cron_expression: "46 * * * *"
next_run_at: 2026-...T06:46:00Z
Contrast — a weekly cron is NOT rewritten: 0 0 * * 1 stays 0 0 * * 1, and onlynext_run_at carries a few-seconds stagger (e.g. 00:01:31, 00:05:27). The minute is
preserved. So the rewrite appears specific to hourly/frequent schedules.
Steps to Reproduce
- Create/update a Routine with
cron_expression = "0 * * * *"(intent: top of every hour). - Save at, e.g., 05:46.
- Inspect the trigger's stored
cron_expressionandnext_run_at. - Observe the minute is now the save-time minute (46), not 0.
Claude Model
Not applicable (scheduling/infrastructure behavior).
Is this a regression?
Not sure / haven't verified against an earlier version.
Claude Code Version
N/A — Claude Code Routines (cloud), managed via the routines API.
Platform
Claude Code on the web / Routines (cloud).
Operating System
N/A (cloud-managed execution).
Terminal/Shell
N/A.
Additional Information
Docs gap: routines.md only mentions "runs may start a few minutes after the scheduled time
due to stagger" and "the offset is consistent per routine." It does not mention rewriting the
cron minute field, and the observed offset (:46 from :00) exceeds the 30-min jitter cap
documented for Scheduled Tasks.
Requests:
- Document the exact minute-jitter/rewrite rule for Routines (when it applies, how the minute
is chosen).
- Provide a way to pin an exact minute (opt out of stagger), or state clearly that
exact-minute scheduling is unsupported for Routines.
- If rewriting the stored
cron_expressionis unintended, treat as a bug.
Observed: 2026-07-20.