fix: evaluate schedules in the cronjob's spec.timeZone #428

Merged
argoyle merged 3 commits from fix/cronjob-timezone into main 2026-10-09 07:54:31 +00:00
Owner

Schedules were always evaluated in UTC because schedule.Next uses the location of lastScheduleTime, which the API returns in UTC. A CronJob with spec.timeZone set was therefore reported as not running every day. For example, Paidit's prod/dayclose runs at 0 7 * * * Europe/Stockholm: it ran at 05:00Z, but cron-checker expected 07:00Z and alerted every minute from 09:02 local time.

  • Convert since to the CronJob's spec.timeZone before computing the next run. CronJobs without a timeZone behave as before.
  • An invalid time zone returns an error, the same way an invalid schedule does.
  • Embed time/tzdata, because the image is FROM scratch and has no zoneinfo.
  • Tests: an invalid time zone, and a time-zone case that fails without the fix.
  • Bumped golang.org/x/net to v0.60.0. govulncheck was already failing on main with five x/net advisories, which blocks the build job.
  • Bumped the go toolchain to 1.27.2 for eight stdlib advisories. This is the same change as Renovate #427, which will close once this is merged.

🤖 Generated with Claude Code

https://claude.ai/code/session_01C8SW6vsbkrTKjLNatQ8JTg

Schedules were always evaluated in UTC because `schedule.Next` uses the location of `lastScheduleTime`, which the API returns in UTC. A CronJob with `spec.timeZone` set was therefore reported as not running every day. For example, Paidit's `prod/dayclose` runs at `0 7 * * *` Europe/Stockholm: it ran at 05:00Z, but cron-checker expected 07:00Z and alerted every minute from 09:02 local time. - Convert `since` to the CronJob's `spec.timeZone` before computing the next run. CronJobs without a `timeZone` behave as before. - An invalid time zone returns an error, the same way an invalid schedule does. - Embed `time/tzdata`, because the image is `FROM scratch` and has no zoneinfo. - Tests: an invalid time zone, and a time-zone case that fails without the fix. - Bumped golang.org/x/net to v0.60.0. govulncheck was already failing on main with five x/net advisories, which blocks the build job. - Bumped the go toolchain to 1.27.2 for eight stdlib advisories. This is the same change as Renovate #427, which will close once this is merged. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01C8SW6vsbkrTKjLNatQ8JTg
argoyle added 1 commit 2026-10-09 07:19:53 +00:00
fix: evaluate schedules in the cronjob's spec.timeZone
cron-checker / test (pull_request) Successful in 1m31s
cron-checker / vulnerabilities (pull_request) Failing after 1m32s
cron-checker / build (pull_request) Skipped
5c09dfc80e
Schedules were always evaluated in UTC, so a cronjob with timeZone set (e.g. 0 7 * * * Europe/Stockholm) was reported as not running every day. Embed tzdata since the image is built from scratch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C8SW6vsbkrTKjLNatQ8JTg
argoyle added 1 commit 2026-10-09 07:22:58 +00:00
fix(deps): update golang.org/x/net to v0.60.0
cron-checker / vulnerabilities (pull_request) Failing after 1m34s
cron-checker / test (pull_request) Successful in 1m57s
cron-checker / build (pull_request) Skipped
485261b462
Fixes GO-2026-6603, GO-2026-6610, GO-2026-6611, GO-2026-6612 and GO-2026-6617 reported by govulncheck.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C8SW6vsbkrTKjLNatQ8JTg
argoyle added 1 commit 2026-10-09 07:44:34 +00:00
fix(deps): update go toolchain directive to v1.27.2
cron-checker / test (pull_request) Successful in 2m35s
cron-checker / vulnerabilities (pull_request) Successful in 2m35s
cron-checker / build (pull_request) Successful in 2m34s
722b60debe
Fixes stdlib advisories GO-2026-6603, 6605, 6607, 6608, 6610, 6611, 6613 and 6617 (same change as Renovate PR #427).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C8SW6vsbkrTKjLNatQ8JTg
argoyle merged commit 52d52a222c into main 2026-10-09 07:54:31 +00:00
argoyle deleted branch fix/cronjob-timezone 2026-10-09 07:54:31 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unboundsoftware/cron-checker#428