Skip to content

Bump github.com/netresearch/go-cron from 0.17.0 to 0.19.0 - #1121

Merged
jfantinhardesty merged 1 commit into
mainfrom
dependabot/go_modules/github.com/netresearch/go-cron-0.19.0
Nov 10, 2026
Merged

jfantinhardesty merged 1 commit into
mainfrom
dependabot/go_modules/github.com/netresearch/go-cron-0.19.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Bumps github.com/netresearch/go-cron from 0.17.0 to 0.19.0.

Release notes

Sourced from github.com/netresearch/go-cron's releases.

v0.19.0

Fix release with one feature. Most changes correct Next and Prev around DST transitions and in unusual time zones, and the hash (H) syntax. The minimum Go version stays at 1.26.

Heads-up: three changes can alter results of existing code.

  • A named job on a Cron with the built-in Parser uses its name as the H hash key. A job that has both a name and a parser key (WithHashKey) gets new H values, and renaming a job moves it (#471).
  • H/1, H in the day-of-week field, and an H step at or above the size of its range select other values than in 0.18.0 (#459).
  • A year field that selects more than 100,000 years is a parse error (#473).

Hash expressions (H)

  • A named job uses its name as the hash key, so AddFunc("H * * * *", f, WithName("job-a")) works without a parser key, and named jobs with the same spec are spread over the field, as in Jenkins. The parser needs the Hash option, which FullParser() includes and the default parser of New() does not: use New(WithParser(FullParser())). An unnamed job keeps the parser's WithHashKey; a custom ScheduleParser still needs its own key. ADR-028 records the decision. By @​CybotTM (#471).
  • H/1 selects every value like */1. H in the day-of-week field chooses each of the seven days equally often; before, Sunday was chosen twice as often. An H step at or above the size of its range selects one value; before, a step larger than the range could leave the field empty, and Next returned the zero time. By @​CybotTM (#459).
  • With WithCache(), the parse cache key holds the spec, every parser setting that changes the result, and the hash key. Before, ParseWithHashKey could return the schedule cached for another key. By @​CybotTM (#466).
  • doc.go and docs/API_REFERENCE.md describe the H syntax, and new Example functions check every value the documentation quotes (#464).

DST transitions and time zones

  • On a DST fall-back day, a spec that runs hourly or more often keeps its rhythm through both copies of the repeated hour, and a spec at fixed times runs each of them once. Before, 0,30 1 * * * in America/New_York ran 01:00 and 01:30 in both EDT and EST. ADR-027 supersedes the fall-back part of ADR-016. Reported by @​norman-abramovitz in #446, fixed by @​CybotTM (#448).
  • A job in a DST spring-forward gap runs once on the transition day for gaps of any length and at any hour, and Next reports that run from any start time before it. 15 2 * * * in Australia/Lord_Howe and 30 0 * * * in America/Santiago had no run on their transition days. Reported by @​norman-abramovitz in #444 and #445, fixed by @​CybotTM (#449).
  • Next starts each new year, month and day at its first instant. Before, TZ=America/Asuncion 0 0 25 11 * skipped November 2023, because that date starts at a skipped midnight (#461).
  • L, L-n, #L, LW and nW match the right day in zones that skip the midnight of a month's last day. Before, L in Atlantic/Azores ran on 2024-03-30 instead of 2024-03-31 (#465).
  • Prev returns at a month that starts in a repeated fall-back period; before, it looped forever there, for example at Asia/Gaza 2004-10-01 (#453).
  • Next and Prev return the right times in a zone whose UTC offset is not a whole number of minutes, such as a time.FixedZone with seconds (#454).
  • WithMissedPolicy computes catch-up times in the cron location, also when the WithPrev value carries another location. A last run time restored in UTC no longer shifts the catch-ups or repeats a day that already ran (#452).

Parser

  • A year field selects at most 100,000 years, counted over all items of a list. Before, 1-20000000 took 3.6 s and 2 GiB to parse; it now returns an error at once. All years up to 99999 fit, and 1-2147483647/100000 still parses. Reported by @​norman-abramovitz in #472, fixed by @​CybotTM (#473).
  • New parse option DowStepToSaturday: a day-of-week N/step runs up to Saturday, as in robfig/cron. RobfigCompat includes it, so 0 0 * * 1/2 runs on Monday, Wednesday and Friday, and no longer also on Sunday as in 0.18.0. Contributed by @​mrueg (#443).

Full changelog: netresearch/go-cron@v0.18.0...v0.19.0

v0.18.0

Feature release. The additions are new API and opt-in parse options; the default parser keeps its behaviour except for the three fixes below, and the minimum Go version stays at 1.26.

Heads-up: SpecSchedule gains a DSTSkip field. Code in another package that builds a SpecSchedule with an unkeyed struct literal (values without field names) no longer compiles until it adds one more value. Code that gets its schedules from a parser, or uses field names, is not affected.

Running a job once across several instances

Several scheduler instances that run the same jobs can now coordinate through a shared Locker. The interface is in the library; the store (Redis, PostgreSQL, …) stays in your code. ADR-025 records the decisions.

  • SkipDuplicateRuns(locker, name, ttl, logger) runs each scheduled time once across all instances. It reserves name@<scheduled time in UTC> before the run and keeps the reservation after it, so an instance with a late clock cannot run the same time again. By @​CybotTM (#437).
  • SkipWhileLocked(locker, key, ttl, logger) skips a run while another run on any instance holds the same key, for example a resource name, and releases the key when the run ends, also after a panic. By @​CybotTM (#439).
  • NewMemoryLocker(clock) is a Locker for one process and for tests (#437).
  • NewConcurrencyGroups() with MaxConcurrent and MaxConcurrentSkip share a concurrency limit by name within one process, between jobs that do not share one wrapper value. By @​CybotTM (#438).
  • docs/DISTRIBUTED_LOCKING_GUIDE.md now builds on these wrappers and explains why a lock named after the job and released after the run does not deduplicate. Its PostgreSQL pattern releases the advisory lock on the connection that took it (#439).

Schedules

... (truncated)

Changelog

Sourced from github.com/netresearch/go-cron's changelog.

[0.19.0] - 2026-11-02

Fix release with one feature. Most changes correct Next and Prev around DST transitions and unusual time zones, and the hash (H) syntax. The minimum Go version stays at 1.26. Three changes can alter results of existing code:

  • A named job on a Cron with the built-in Parser uses its name as the H hash key. A job that has a name and a parser key gets new H values ([PR#471]).
  • H/1, H in the day-of-week field and an H step larger than its range select other values than before ([PR#459]).
  • A year field that selects more than 100,000 years is a parse error ([PR#473]).

Added

  • On a Cron with the built-in Parser, a named job uses its name as the hash key for H. The parser still needs the Hash option, which FullParser() includes and the default parser of New() does not. With New(WithParser(FullParser())), AddFunc("H * * * *", f, WithName("job-a")) works without a parser key, and named jobs with the same spec are spread over the field, as in Jenkins. An unnamed job keeps the parser's WithHashKey. A job with both a name and a parser key gets new H values, and renaming a job moves it. A custom ScheduleParser is unchanged and needs its own key. ADR-028 records the decision ([PR#471])
  • DowStepToSaturday parse option: a day-of-week N/step (such as 1/2) runs up to Saturday (6), as in robfig/cron, instead of up to Sunday as 7. It accepts the same specs as the default parser. Contributed by [@​mrueg] ([PR#443])

Changed

  • A year field selects at most 100,000 years, counted over all items of a list. A spec above the limit returns an error at once; before, 1-20000000 took 3.6 s and 2 GiB to parse. All years up to 99999 fit, and a step counts, so 1-2147483647/100000 still parses. Reported by [@​norman-abramovitz] ([PR#473])

Fixed

  • RobfigCompat now includes DowStepToSaturday, so 0 0 * * 1/2 runs on Monday, Wednesday and Friday as in robfig/cron v3, and no longer also on Sunday as in v0.18.0. Contributed by [@​mrueg] ([PR#443])
  • On a DST fall-back day, a spec that runs hourly or more often keeps its rhythm through both copies of the repeated hour, and a spec at fixed times runs each of them once. Before, 0,30 1 * * * in America/New_York ran 01:00 and 01:30 in both EDT and EST. ADR-027 supersedes the fall-back part of ADR-016. Reported by [@​norman-abramovitz] ([PR#448])
  • A job in a DST spring-forward gap runs once on the transition day for gaps of any length and at any hour, and Next reports that run from any start time before it. 15 2 * * * in Australia/Lord_Howe and 30 0 * * * in America/Santiago had no run on their transition days. Reported by [@​norman-abramovitz] ([PR#449])

... (truncated)

Commits
  • c37cc33 chore(release): v0.19.0 (#474)
  • ed7d658 docs(changelog): state the parser conditions of the 0.19.0 H entries
  • a845ac7 chore(release): v0.19.0
  • fdcff5d fix(parser): limit how many years a year field can select (#473)
  • 355f530 fix(parser): limit how many years a year field can select
  • 15e96ce feat(cron): use the entry name as the hash key for H (#471)
  • a6fb397 feat(cron): use the entry name as the hash key for H
  • 89afa4d fix(ci): preserve strict action pin checks (#469)
  • a69a111 fix(ci): preserve strict action pin checks
  • 89d8ac8 fix(parser): key the parse cache by spec and parser settings (#466)
  • Additional commits viewable in compare view

@dependabot dependabot Bot added the dependencies Pull requests that update a dependency file label Nov 9, 2026
@dependabot
dependabot Bot requested a review from brayan-trejo as a code owner November 9, 2026 23:39
@dependabot dependabot Bot added the go Pull requests that update Go code label Nov 9, 2026
Bumps [github.com/netresearch/go-cron](https://github.com/netresearch/go-cron) from 0.17.0 to 0.19.0.
- [Release notes](https://github.com/netresearch/go-cron/releases)
- [Changelog](https://github.com/netresearch/go-cron/blob/main/CHANGELOG.md)
- [Commits](netresearch/go-cron@v0.17.0...v0.19.0)

---
updated-dependencies:
- dependency-name: github.com/netresearch/go-cron
  dependency-version: 0.19.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@jfantinhardesty
jfantinhardesty merged commit 325a5f1 into main Nov 10, 2026
23 checks passed
@jfantinhardesty
jfantinhardesty deleted the dependabot/go_modules/github.com/netresearch/go-cron-0.19.0 branch November 10, 2026 17:34

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file go Pull requests that update Go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant