Commit Graph
5 Commits
Author SHA1 Message Date
argoyle 52d52a222c fix: evaluate schedules in the cronjob's spec.timeZone (#428)
Unbound Release / Check Preconditions (push) Successful in 3s
Unbound Release / Create Tag (push) Skipped
Unbound Release / Create Release (push) Successful in 15s
Unbound Release / Generate Changelog and Handle PR (push) Successful in 17s
Release / release (push) Successful in 21s
cron-checker / test (push) Successful in 2m12s
cron-checker / vulnerabilities (push) Successful in 2m15s
cron-checker / build (push) Successful in 50s
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
Reviewed-on: https://gitea.unbound.se/unboundsoftware/cron-checker/pulls/428
2026-10-09 07:54:30 +00:00
argoyle e2e1fa652a ci: update kingpin dependency 2023-05-23 19:32:04 +02:00
argoyle 715939d794 chore: update to batch/v1 instead of the deprecated batch/v1beta1 2022-09-23 18:54:54 +02:00
argoyle 7110d8c14b chore: refactor and add tests 2020-09-06 13:20:55 +02:00
argoyle d2a946782f feat: initial commit 2020-08-27 09:52:25 +02:00