chore(deps): update module github.com/go-co-op/gocron to v2 (#56)
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [github.com/go-co-op/gocron](https://github.com/go-co-op/gocron) | `v1.37.0` → `v2.22.0` |  |  | --- ### Release Notes <details> <summary>go-co-op/gocron (github.com/go-co-op/gocron)</summary> ### [`v2.22.0`](https://github.com/go-co-op/gocron/releases/tag/v2.22.0) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.21.2...v2.22.0) #### What's Changed - build(deps): bump golangci/golangci-lint-action from 9.2.0 to 9.2.1 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​927](https://github.com/go-co-op/gocron/pull/927) - build(deps): bump golangci/golangci-lint-action from 9.2.1 to 9.3.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​929](https://github.com/go-co-op/gocron/pull/929) - build(deps): bump actions/checkout from 6 to 7 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​928](https://github.com/go-co-op/gocron/pull/928) - fix: various performance improvements and clean up by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​930](https://github.com/go-co-op/gocron/pull/930) - fixes: internal job func call handles param len mismatch, and global job options supports multiple calls by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​931](https://github.com/go-co-op/gocron/pull/931) - fix(scheduler): skipped runs no longer consume WithLimitedRuns budget by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​932](https://github.com/go-co-op/gocron/pull/932) - refactor(scheduler): make nextScheduled ascending-time invariant explicit by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​933](https://github.com/go-co-op/gocron/pull/933) - refactor: adding modernize and embeddedstructfieldcheck linters by [@​manuelarte](https://github.com/manuelarte) in [#​934](https://github.com/go-co-op/gocron/pull/934) - M-tier hygiene: constants, dedup, ErrSchedulerBusy, docs by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​935](https://github.com/go-co-op/gocron/pull/935) - L-tier finale: typed LimitMode, docstrings, invariant comments by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​936](https://github.com/go-co-op/gocron/pull/936) - fix: eliminate shared mutable state across jobs (C4, H5) by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​937](https://github.com/go-co-op/gocron/pull/937) - ci: gate pre-commit config, add Dependabot pin updates by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​938](https://github.com/go-co-op/gocron/pull/938) - ci: track Go stable/oldstable instead of pinned versions by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​942](https://github.com/go-co-op/gocron/pull/942) - build(deps): bump <https://github.com/TekWizely/pre-commit-golang> from v1.0.0-rc.1 to 1.0.0.pre.rc.4 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​941](https://github.com/go-co-op/gocron/pull/941) - build(deps): bump <https://github.com/pre-commit/pre-commit-hooks> from v5.0.0 to 6.0.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​940](https://github.com/go-co-op/gocron/pull/940) - build(deps): bump <https://github.com/golangci/golangci-lint> from v2.11.4 to 2.12.2 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​939](https://github.com/go-co-op/gocron/pull/939) - test(scheduler): regression test for issue [#​943](https://github.com/go-co-op/gocron/issues/943) OneTimeJob CPU spin by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​944](https://github.com/go-co-op/gocron/pull/944) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.21.2...v2.22.0> ### [`v2.21.2`](https://github.com/go-co-op/gocron/releases/tag/v2.21.2) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.21.1...v2.21.2) #### What's Changed - fix: defer WithLimitedRuns job removal until task completes ([#​925](https://github.com/go-co-op/gocron/issues/925)) by [@​SAY-5](https://github.com/SAY-5) in [#​926](https://github.com/go-co-op/gocron/pull/926) #### New Contributors - [@​SAY-5](https://github.com/SAY-5) made their first contribution in [#​926](https://github.com/go-co-op/gocron/pull/926) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.21.1...v2.21.2> ### [`v2.21.1`](https://github.com/go-co-op/gocron/releases/tag/v2.21.1) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.21.0...v2.21.1) #### What's Changed - fix: remove jobs and respect stopTime in NextRuns when WithStopDateTi… by [@​jcheyer](https://github.com/jcheyer) in [#​922](https://github.com/go-co-op/gocron/pull/922) #### New Contributors - [@​jcheyer](https://github.com/jcheyer) made their first contribution in [#​922](https://github.com/go-co-op/gocron/pull/922) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.21.0...v2.21.1> ### [`v2.21.0`](https://github.com/go-co-op/gocron/releases/tag/v2.21.0) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.20.0...v2.21.0) #### What's Changed - feat: add WithDSTPolicy option for DST spring-forward handling by [@​Copilot](https://github.com/Copilot) in [#​917](https://github.com/go-co-op/gocron/pull/917) - feat: add IsRunning() and LastRunCompletedAt() to Job interface by [@​Copilot](https://github.com/Copilot) in [#​918](https://github.com/go-co-op/gocron/pull/918) - feat: Expose job schedule information via `Schedule()` method on `Job` interface by [@​Copilot](https://github.com/Copilot) in [#​919](https://github.com/go-co-op/gocron/pull/919) #### Test Suite - test: enhancements to testing speed and reliablity by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​920](https://github.com/go-co-op/gocron/pull/920) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.20.0...v2.21.0> ### [`v2.20.0`](https://github.com/go-co-op/gocron/releases/tag/v2.20.0) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.19.1...v2.20.0) #### What's Changed - feat: add ShutdownWithContext and StopJobsWithContext by [@​huynhanx03](https://github.com/huynhanx03) in [#​913](https://github.com/go-co-op/gocron/pull/913) #### Performance improvements - perf: replace string allocation with bytes.Compare in Jobs() UUID sort by [@​huynhanx03](https://github.com/huynhanx03) in [#​914](https://github.com/go-co-op/gocron/pull/914) #### Fixes - Fix CronJob duplicate execution during DST fall-back by [@​Copilot](https://github.com/Copilot) in [#​912](https://github.com/go-co-op/gocron/pull/912) #### Docs - docs: clarify NextRun/NextRuns require scheduler to be started by [@​Copilot](https://github.com/Copilot) in [#​910](https://github.com/go-co-op/gocron/pull/910) #### New Contributors - [@​huynhanx03](https://github.com/huynhanx03) made their first contribution in [#​913](https://github.com/go-co-op/gocron/pull/913) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.19.1...v2.20.0> ### [`v2.19.1`](https://github.com/go-co-op/gocron/releases/tag/v2.19.1) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.19.0...v2.19.1) #### What's Changed - \[fix] race condition in `NextRun()` when multiple jobs complete simultaneously by [@​barkhayot](https://github.com/barkhayot) in [#​907](https://github.com/go-co-op/gocron/pull/907) - Fix broken monitors link in README by [@​Copilot](https://github.com/Copilot) in [#​908](https://github.com/go-co-op/gocron/pull/908) #### New Contributors - [@​barkhayot](https://github.com/barkhayot) made their first contribution in [#​907](https://github.com/go-co-op/gocron/pull/907) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.19.0...v2.19.1> ### [`v2.19.0`](https://github.com/go-co-op/gocron/releases/tag/v2.19.0) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.18.2...v2.19.0) #### What's Changed - feat: add scheduler lifecycle monitoring <> [#​785](https://github.com/go-co-op/gocron/issues/785) by [@​iyashjayesh](https://github.com/iyashjayesh) in [#​889](https://github.com/go-co-op/gocron/pull/889) - feat: expose default cron implementation by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​906](https://github.com/go-co-op/gocron/pull/906) - build(deps): bump golangci/golangci-lint-action from 9.1.0 to 9.2.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​903](https://github.com/go-co-op/gocron/pull/903) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.18.2...v2.19.0> ### [`v2.18.2`](https://github.com/go-co-op/gocron/releases/tag/v2.18.2) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.18.1...v2.18.2) #### What's Changed - build(deps): bump golangci/golangci-lint-action from 9.0.0 to 9.1.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​899](https://github.com/go-co-op/gocron/pull/899) - build(deps): bump actions/checkout from 5 to 6 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​898](https://github.com/go-co-op/gocron/pull/898) - fix: calling start multiple times should no-op by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​901](https://github.com/go-co-op/gocron/pull/901) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.18.1...v2.18.2> ### [`v2.18.1`](https://github.com/go-co-op/gocron/releases/tag/v2.18.1) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.18.0...v2.18.1) #### What's Changed - build(deps): bump golangci/golangci-lint-action from 8.0.0 to 9.0.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​894](https://github.com/go-co-op/gocron/pull/894) - fix: WithStartDateTimePast now correctly calculates from past time by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​897](https://github.com/go-co-op/gocron/pull/897) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.18.0...v2.18.1> ### [`v2.18.0`](https://github.com/go-co-op/gocron/releases/tag/v2.18.0) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.17.0...v2.18.0) #### What's Changed - feat: Add option to calculate intervals from job completion time for interval-based scheduling (fixes [#​565](https://github.com/go-co-op/gocron/issues/565)) by [@​iyashjayesh](https://github.com/iyashjayesh) in [#​884](https://github.com/go-co-op/gocron/pull/884) #### Fixes - fix: limit validation for WithLimitedRuns by [@​OsipovMax](https://github.com/OsipovMax) in [#​893](https://github.com/go-co-op/gocron/pull/893) #### Chores - doc: add v1 to v2 migration guide by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​890](https://github.com/go-co-op/gocron/pull/890) - tests: add more daylight savings time tests by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​891](https://github.com/go-co-op/gocron/pull/891) - docs: add Articles & Blog Posts section to README by [@​iyashjayesh](https://github.com/iyashjayesh) in [#​886](https://github.com/go-co-op/gocron/pull/886) - Bump github/codeql-action from 3 to 4 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​883](https://github.com/go-co-op/gocron/pull/883) #### New Contributors - [@​OsipovMax](https://github.com/OsipovMax) made their first contribution in [#​893](https://github.com/go-co-op/gocron/pull/893) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.17.0...v2.18.0> ### [`v2.17.0`](https://github.com/go-co-op/gocron/releases/tag/v2.17.0) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.16.6...v2.17.0) #### What's Changed - feat: add WithStartDateTimePast WithStartAt option by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​882](https://github.com/go-co-op/gocron/pull/882) #### Performance Improvements - Reusing the results of reflections to improve performance by [@​apocelipes](https://github.com/apocelipes) in [#​873](https://github.com/go-co-op/gocron/pull/873) #### Fixes - fix: handle negative time.durations with error by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​878](https://github.com/go-co-op/gocron/pull/878) - fix: multiple calls to shutdown should be no-op by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​880](https://github.com/go-co-op/gocron/pull/880) #### Chores - chore: go 1.23 is end of life - now go 1.24 by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​879](https://github.com/go-co-op/gocron/pull/879) - Update README.md by [@​iyashjayesh](https://github.com/iyashjayesh) in [#​875](https://github.com/go-co-op/gocron/pull/875) #### New Contributors - [@​iyashjayesh](https://github.com/iyashjayesh) made their first contribution in [#​875](https://github.com/go-co-op/gocron/pull/875) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.16.6...v2.17.0> ### [`v2.16.6`](https://github.com/go-co-op/gocron/releases/tag/v2.16.6) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.16.5...v2.16.6) #### What's Changed - a return is missing to stop execution if the job is not found by [@​sarff](https://github.com/sarff) in [#​872](https://github.com/go-co-op/gocron/pull/872) #### Chores - Bump actions/setup-go from 5 to 6 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​871](https://github.com/go-co-op/gocron/pull/871) #### New Contributors - [@​sarff](https://github.com/sarff) made their first contribution in [#​872](https://github.com/go-co-op/gocron/pull/872) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.16.5...v2.16.6> ### [`v2.16.5`](https://github.com/go-co-op/gocron/releases/tag/v2.16.5) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.16.4...v2.16.5) #### What's Changed - Use `errors.New` for non-formatted strings by [@​apocelipes](https://github.com/apocelipes) in [#​870](https://github.com/go-co-op/gocron/pull/870) - Add go1.25 tests by [@​apocelipes](https://github.com/apocelipes) in [#​869](https://github.com/go-co-op/gocron/pull/869) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.16.4...v2.16.5> ### [`v2.16.4`](https://github.com/go-co-op/gocron/releases/tag/v2.16.4) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.16.3...v2.16.4) #### What's Changed - Bump actions/checkout from 4 to 5 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​860](https://github.com/go-co-op/gocron/pull/860) - Bump golang.org/x/crypto from 0.40.0 to 0.41.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​859](https://github.com/go-co-op/gocron/pull/859) - Add comprehensive GitHub Copilot instructions for gocron development by [@​Copilot](https://github.com/Copilot) in [#​866](https://github.com/go-co-op/gocron/pull/866) - Fix memory consumption issue by changing jobOutRequest channels to use pointers and reducing buffer size by [@​Copilot](https://github.com/Copilot) in [#​864](https://github.com/go-co-op/gocron/pull/864) - Bump testify by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​868](https://github.com/go-co-op/gocron/pull/868) #### New Contributors - [@​Copilot](https://github.com/Copilot) made their first contribution in [#​866](https://github.com/go-co-op/gocron/pull/866) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.16.3...v2.16.4> ### [`v2.16.3`](https://github.com/go-co-op/gocron/releases/tag/v2.16.3) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.16.2...v2.16.3) #### What's Changed - fix: cancel job contexts in create/update errors by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​858](https://github.com/go-co-op/gocron/pull/858) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.16.2...v2.16.3> ### [`v2.16.2`](https://github.com/go-co-op/gocron/releases/tag/v2.16.2) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.16.1...v2.16.2) #### What's Changed - docs: adapt README to the dark theme by [@​alexandear](https://github.com/alexandear) in [#​844](https://github.com/go-co-op/gocron/pull/844) - go 1.23 & golangci-lint v2 by [@​dependabot](https://github.com/dependabot) in [#​843](https://github.com/go-co-op/gocron/pull/843) - [Go 1.22 and below are end of life](https://endoflife.date/go) - Bump golangci/golangci-lint-action from 7.0.0 to 8.0.0 by [@​dependabot](https://github.com/dependabot) in [#​847](https://github.com/go-co-op/gocron/pull/847) - chore: document the limitations with the locker design by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​848](https://github.com/go-co-op/gocron/pull/848) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.16.1...v2.16.2> ### [`v2.16.1`](https://github.com/go-co-op/gocron/releases/tag/v2.16.1) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.16.0...v2.16.1) #### What's Changed - Fix [#​835](https://github.com/go-co-op/gocron/issues/835) and [#​837](https://github.com/go-co-op/gocron/issues/837) by [@​apocelipes](https://github.com/apocelipes) in [#​836](https://github.com/go-co-op/gocron/pull/836) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.16.0...v2.16.1> ### [`v2.16.0`](https://github.com/go-co-op/gocron/releases/tag/v2.16.0) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.15.0...v2.16.0) #### What's Changed - feat:custom-cron interface for own custom cron implimentation by [@​Dojeto](https://github.com/Dojeto) in [#​834](https://github.com/go-co-op/gocron/pull/834) #### Bug fixes - fixes related to the bug where a job unexpectedly runs twice by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​810](https://github.com/go-co-op/gocron/pull/810) - fix scheduler restart by [@​27149chen](https://github.com/27149chen) in [#​825](https://github.com/go-co-op/gocron/pull/825) - removes nextRuns in the past when job skipped by locker [#​828](https://github.com/go-co-op/gocron/issues/828) by [@​manuelarte](https://github.com/manuelarte) in [#​829](https://github.com/go-co-op/gocron/pull/829) #### Chores - go to 1.21, upgrade deps by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​822](https://github.com/go-co-op/gocron/pull/822) - replace "golang.org/x/exp" with standard libraries by [@​apocelipes](https://github.com/apocelipes) in [#​823](https://github.com/go-co-op/gocron/pull/823) - Bump golangci/golangci-lint-action from 6.2.0 to 6.3.2 by [@​dependabot](https://github.com/dependabot) in [#​827](https://github.com/go-co-op/gocron/pull/827) - fix err assertion in TestScheduler\_RemoveJob by [@​alexandear](https://github.com/alexandear) in [#​830](https://github.com/go-co-op/gocron/pull/830) - Bump golangci/golangci-lint-action from 6.3.2 to 6.5.0 by [@​dependabot](https://github.com/dependabot) in [#​831](https://github.com/go-co-op/gocron/pull/831) - re-enable goleak detection in ci by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​832](https://github.com/go-co-op/gocron/pull/832) - chore: add go1.24 to ci by [@​apocelipes](https://github.com/apocelipes) in [#​833](https://github.com/go-co-op/gocron/pull/833) #### New Contributors - [@​alexandear](https://github.com/alexandear) made their first contribution in [#​830](https://github.com/go-co-op/gocron/pull/830) - [@​Dojeto](https://github.com/Dojeto) made their first contribution in [#​834](https://github.com/go-co-op/gocron/pull/834) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.15.0...v2.16.0> ### [`v2.15.0`](https://github.com/go-co-op/gocron/releases/tag/v2.15.0) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.14.2...v2.15.0) #### What's New - New method WithContext supports providing a parent context by [@​27149chen](https://github.com/27149chen) in [#​819](https://github.com/go-co-op/gocron/pull/819) & [@​JohnRoesler](https://github.com/JohnRoesler) in [#​820](https://github.com/go-co-op/gocron/pull/820) ```go // WithContext sets the parent context for the job. // If you set the first argument of your Task func to be a context.Context, // gocron will pass in the provided context to the job and will cancel the // context on shutdown. If you cancel the context the job will no longer be // scheduled as well. This allows you to both control the job via a context // and listen for and handle cancellation within your job. ``` - Job task function now supports passing a ctx if the first argument in your function is a `context.Context` by [@​27149chen](https://github.com/27149chen) in [#​819](https://github.com/go-co-op/gocron/pull/819) & [@​JohnRoesler](https://github.com/JohnRoesler) in [#​820](https://github.com/go-co-op/gocron/pull/820) ```go // NewTask provides the job's task function and parameters. // If you set the first argument of your Task func to be a context.Context, // gocron will pass in a context (either the default Job context, or one // provided via WithContext) to the job and will cancel the context on shutdown. // This allows you to listen for and handle cancellation within your job. ``` #### Chores - Bump golangci/golangci-lint-action from 6.1.1 to 6.2.0 by [@​dependabot](https://github.com/dependabot) in [#​817](https://github.com/go-co-op/gocron/pull/817) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.14.2...v2.15.0> ### [`v2.14.2`](https://github.com/go-co-op/gocron/releases/tag/v2.14.2) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.14.1...v2.14.2) #### What's Changed - feat: allow disabling global distributed locker per job by [@​seinshah](https://github.com/seinshah) in [#​811](https://github.com/go-co-op/gocron/pull/811) - feat(event listener): introduce BeforeJobRunsSkipIfBeforeFuncErrors as a new Eventlistener by [@​FalcoSuessgott](https://github.com/FalcoSuessgott) in [#​813](https://github.com/go-co-op/gocron/pull/813) #### New Contributors - [@​seinshah](https://github.com/seinshah) made their first contribution in [#​811](https://github.com/go-co-op/gocron/pull/811) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.14.1...v2.14.2> ### [`v2.14.1`](https://github.com/go-co-op/gocron/releases/tag/v2.14.1) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.14.0...v2.14.1) #### What's Changed - BUG FIX: creating a new slice in several job options because appending modifies original by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​809](https://github.com/go-co-op/gocron/pull/809) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.14.0...v2.14.1> ### [`v2.14.0`](https://github.com/go-co-op/gocron/releases/tag/v2.14.0) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.13.0...v2.14.0) #### What's Changed - parse time.Time from AtTime by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​806](https://github.com/go-co-op/gocron/pull/806) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.13.0...v2.14.0> ### [`v2.13.0`](https://github.com/go-co-op/gocron/releases/tag/v2.13.0) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.12.4...v2.13.0) #### What's Changed - Bump github.com/stretchr/testify from 1.9.0 to 1.10.0 by [@​dependabot](https://github.com/dependabot) in [#​801](https://github.com/go-co-op/gocron/pull/801) - stop timeout timers when no longer needed by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​803](https://github.com/go-co-op/gocron/pull/803) - feat(monitor): introduce MonitorStatus by [@​FalcoSuessgott](https://github.com/FalcoSuessgott) in [#​780](https://github.com/go-co-op/gocron/pull/780) #### New Contributors - [@​FalcoSuessgott](https://github.com/FalcoSuessgott) made their first contribution in [#​780](https://github.com/go-co-op/gocron/pull/780) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.12.4...v2.13.0> ### [`v2.12.4`](https://github.com/go-co-op/gocron/releases/tag/v2.12.4) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.12.3...v2.12.4) #### What's Changed - Bump golangci/golangci-lint-action from 6.1.0 to 6.1.1 by [@​dependabot](https://github.com/dependabot) in [#​781](https://github.com/go-co-op/gocron/pull/781) - fix overly greedy panic handler by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​800](https://github.com/go-co-op/gocron/pull/800) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.12.3...v2.12.4> ### [`v2.12.3`](https://github.com/go-co-op/gocron/releases/tag/v2.12.3) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.12.2...v2.12.3) #### What's Changed - update mocks with latest job/scheduler changes by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​794](https://github.com/go-co-op/gocron/pull/794) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.12.2...v2.12.3> ### [`v2.12.2`](https://github.com/go-co-op/gocron/releases/tag/v2.12.2) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.12.1...v2.12.2) #### What's Changed - dailyjob should not allow interval zero by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​791](https://github.com/go-co-op/gocron/pull/791) - weekly and monthly jobs should not allow zero interval by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​792](https://github.com/go-co-op/gocron/pull/792) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.12.1...v2.12.2> ### [`v2.12.1`](https://github.com/go-co-op/gocron/releases/tag/v2.12.1) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.12.0...v2.12.1) #### What's Changed - Fix CPU spike / max-out in One-time job when 2 or more equal times are provided by [@​rbroggi](https://github.com/rbroggi) in [#​779](https://github.com/go-co-op/gocron/pull/779) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.12.0...v2.12.1> ### [`v2.12.0`](https://github.com/go-co-op/gocron/releases/tag/v2.12.0) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.11.0...v2.12.0) #### What's Changed - add Rescheduled metric for executor. by [@​Higan](https://github.com/Higan) in [#​763](https://github.com/go-co-op/gocron/pull/763) - handle crontab and return error with invalid day in a month by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​766](https://github.com/go-co-op/gocron/pull/766) - Bump golangci/golangci-lint-action from 6.0.1 to 6.1.0 by [@​dependabot](https://github.com/dependabot) in [#​764](https://github.com/go-co-op/gocron/pull/764) - fix: cleanup timers by [@​hayotbisonai](https://github.com/hayotbisonai) in [#​776](https://github.com/go-co-op/gocron/pull/776) #### New Contributors - [@​hayotbisonai](https://github.com/hayotbisonai) made their first contribution in [#​776](https://github.com/go-co-op/gocron/pull/776) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.11.0...v2.12.0> ### [`v2.11.0`](https://github.com/go-co-op/gocron/releases/tag/v2.11.0) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.10.1...v2.11.0) #### Features - `WithStopAt` added to `JobOption`'s to allow giving a time for jobs to stop running by [@​Higan](https://github.com/Higan) in [#​760](https://github.com/go-co-op/gocron/pull/760) #### Fixes - Fix typo in security policy by [@​deining](https://github.com/deining) in [#​759](https://github.com/go-co-op/gocron/pull/759) #### Internal - internal refactoring by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​761](https://github.com/go-co-op/gocron/pull/761) #### New Contributors - [@​deining](https://github.com/deining) made their first contribution in [#​759](https://github.com/go-co-op/gocron/pull/759) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.10.1...v2.11.0> ### [`v2.10.1`](https://github.com/go-co-op/gocron/releases/tag/v2.10.1) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.10.0...v2.10.1) #### What's Changed - fix validation of variadic parameters when the type is interfaceby [@​apocelipes](https://github.com/apocelipes) in [#​757](https://github.com/go-co-op/gocron/pull/757) #### New Contributors - [@​apocelipes](https://github.com/apocelipes) made their first contribution in [#​757](https://github.com/go-co-op/gocron/pull/757) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.10.0...v2.10.1> ### [`v2.10.0`](https://github.com/go-co-op/gocron/releases/tag/v2.10.0) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.9.0...v2.10.0) #### What's Changed - issue-677: support task creation with variadic args by [@​Higan](https://github.com/Higan) in [#​755](https://github.com/go-co-op/gocron/pull/755) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.9.0...v2.10.0> ### [`v2.9.0`](https://github.com/go-co-op/gocron/releases/tag/v2.9.0) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.8.0...v2.9.0) #### What's Changed - issue-751: speed up rescheduling when time scheduling from is time.Zero by [@​samuelattwood](https://github.com/samuelattwood) in [#​752](https://github.com/go-co-op/gocron/pull/752) - feat: add WithIdentifier() as new job option by [@​pcfreak30](https://github.com/pcfreak30) in [#​754](https://github.com/go-co-op/gocron/pull/754) #### New Contributors - [@​samuelattwood](https://github.com/samuelattwood) made their first contribution in [#​752](https://github.com/go-co-op/gocron/pull/752) - [@​pcfreak30](https://github.com/pcfreak30) made their first contribution in [#​754](https://github.com/go-co-op/gocron/pull/754) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.8.0...v2.9.0> ### [`v2.8.0`](https://github.com/go-co-op/gocron/releases/tag/v2.8.0) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.7.1...v2.8.0) #### What's Changed - issue-747: Provide more details of ErrPanicRecovered by [@​Higan](https://github.com/Higan) in [#​749](https://github.com/go-co-op/gocron/pull/749) #### New Contributors - [@​Higan](https://github.com/Higan) made their first contribution in [#​749](https://github.com/go-co-op/gocron/pull/749) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.7.1...v2.8.0> ### [`v2.7.1`](https://github.com/go-co-op/gocron/releases/tag/v2.7.1) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.7.0...v2.7.1) #### What's Changed - issue-740: ascending time function by [@​rbroggi](https://github.com/rbroggi) in [#​744](https://github.com/go-co-op/gocron/pull/744) - fix jobs not starting on scheduler restart when using WithLimitConcurrentJobs by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​745](https://github.com/go-co-op/gocron/pull/745) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.7.0...v2.7.1> ### [`v2.7.0`](https://github.com/go-co-op/gocron/releases/tag/v2.7.0) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.6.0...v2.7.0) #### Added - issue-740: expand oneTimeJob to support multiple times by [@​rbroggi](https://github.com/rbroggi) in [#​741](https://github.com/go-co-op/gocron/pull/741) - [go doc](https://pkg.go.dev/github.com/go-co-op/gocron/v2#OneTimeJobStartDateTimes) #### Fixed - issue-742: bug in `NextRun` by [@​rbroggi](https://github.com/rbroggi) in [#​743](https://github.com/go-co-op/gocron/pull/743) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.6.0...v2.7.0> ### [`v2.6.0`](https://github.com/go-co-op/gocron/releases/tag/v2.6.0) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.5.0...v2.6.0) #### Added - after lock error listener by [@​manuelarte](https://github.com/manuelarte) in [#​734](https://github.com/go-co-op/gocron/pull/734) - [go doc](https://pkg.go.dev/github.com/go-co-op/gocron/v2#AfterLockError) - Add `AfterJobRunsWithPanic` by [@​trungdlp-wolffun](https://github.com/trungdlp-wolffun) in [#​733](https://github.com/go-co-op/gocron/pull/733) - [go doc](https://pkg.go.dev/github.com/go-co-op/gocron/v2#AfterJobRunsWithPanic) #### Fixed - issue-738: make withSeconds optional in cron-expression by [@​rbroggi](https://github.com/rbroggi) in [#​739](https://github.com/go-co-op/gocron/pull/739) - issue-736: moving validation of one-time to by [@​rbroggi](https://github.com/rbroggi) in [#​737](https://github.com/go-co-op/gocron/pull/737) #### Misc - Bump golangci/golangci-lint-action from 5.3.0 to 6.0.1 by [@​dependabot](https://github.com/dependabot) in [#​730](https://github.com/go-co-op/gocron/pull/730) - remove circleci config by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​735](https://github.com/go-co-op/gocron/pull/735) #### New Contributors - [@​manuelarte](https://github.com/manuelarte) made their first contribution in [#​734](https://github.com/go-co-op/gocron/pull/734) - [@​trungdlp-wolffun](https://github.com/trungdlp-wolffun) made their first contribution in [#​733](https://github.com/go-co-op/gocron/pull/733) - [@​rbroggi](https://github.com/rbroggi) made their first contribution in [#​739](https://github.com/go-co-op/gocron/pull/739) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.5.0...v2.6.0> ### [`v2.5.0`](https://github.com/go-co-op/gocron/releases/tag/v2.5.0) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.4.1...v2.5.0) #### What's Changed - adding Job.NextRuns to provide n next run times by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​729](https://github.com/go-co-op/gocron/pull/729) - Bump golangci/golangci-lint-action from 4.0.0 to 5.3.0 by [@​dependabot](https://github.com/dependabot) in [#​728](https://github.com/go-co-op/gocron/pull/728) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.4.1...v2.5.0> ### [`v2.4.1`](https://github.com/go-co-op/gocron/releases/tag/v2.4.1) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.4.0...v2.4.1) #### What's Changed - fix memory leak with singleton mode where job is sending duplicate reschedule requests by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​723](https://github.com/go-co-op/gocron/pull/723) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.4.0...v2.4.1> ### [`v2.4.0`](https://github.com/go-co-op/gocron/releases/tag/v2.4.0) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.3.0...v2.4.0) #### What's Changed - Added JobsWaitingInQueue in Scheduler by [@​giri-vsr](https://github.com/giri-vsr) in [#​721](https://github.com/go-co-op/gocron/pull/721) - don't trash the incoming slice, match what was done in NewAtTime by [@​cloudkucooland](https://github.com/cloudkucooland) in [#​724](https://github.com/go-co-op/gocron/pull/724) #### New Contributors - [@​cloudkucooland](https://github.com/cloudkucooland) made their first contribution in [#​724](https://github.com/go-co-op/gocron/pull/724) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.3.0...v2.4.0> ### [`v2.3.0`](https://github.com/go-co-op/gocron/releases/tag/v2.3.0) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.2.10...v2.3.0) #### What's Changed - Add Go 1.22 to test matrix by [@​evgenymarkov](https://github.com/evgenymarkov) in [#​714](https://github.com/go-co-op/gocron/pull/714) - Monitor: IncrementJob in case of skipped job run by [@​giri-vsr](https://github.com/giri-vsr) in [#​715](https://github.com/go-co-op/gocron/pull/715) - fix mocks import path by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​720](https://github.com/go-co-op/gocron/pull/720) #### New Contributors - [@​evgenymarkov](https://github.com/evgenymarkov) made their first contribution in [#​714](https://github.com/go-co-op/gocron/pull/714) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.2.10...v2.2.11> ### [`v2.2.10`](https://github.com/go-co-op/gocron/releases/tag/v2.2.10) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.2.9...v2.2.10) #### What's Changed - fix nextRun with singleton mode reporting incorrect time by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​705](https://github.com/go-co-op/gocron/pull/705) - Added Distributed Locker to JobOptions by [@​giri-vsr](https://github.com/giri-vsr) in [#​711](https://github.com/go-co-op/gocron/pull/711) #### New Contributors - [@​giri-vsr](https://github.com/giri-vsr) made their first contribution in [#​711](https://github.com/go-co-op/gocron/pull/711) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.2.9...v2.2.10> ### [`v2.2.9`](https://github.com/go-co-op/gocron/releases/tag/v2.2.9) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.2.8...v2.2.9) #### What's Changed - fix case where OneTimeJob with concurrent limit and limited runs fails to run by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​703](https://github.com/go-co-op/gocron/pull/703) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.2.8...v2.2.9> ### [`v2.2.8`](https://github.com/go-co-op/gocron/releases/tag/v2.2.8) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.2.7...v2.2.8) #### What's Changed - return an error if duration is zero by [@​moyu-x](https://github.com/moyu-x) in [#​701](https://github.com/go-co-op/gocron/pull/701) - properly report lastRun for limit type jobs and RunNow by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​700](https://github.com/go-co-op/gocron/pull/700) #### New Contributors - [@​moyu-x](https://github.com/moyu-x) made their first contribution in [#​701](https://github.com/go-co-op/gocron/pull/701) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.2.7...v2.2.8> ### [`v2.2.7`](https://github.com/go-co-op/gocron/releases/tag/v2.2.7) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.2.6...v2.2.7) #### What's Changed - Allow more time for requestJobCtx by [@​drewgonzales360](https://github.com/drewgonzales360) in [#​699](https://github.com/go-co-op/gocron/pull/699) - fix case where job removed causes panic when rescheduling by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​698](https://github.com/go-co-op/gocron/pull/698) #### New Contributors - [@​drewgonzales360](https://github.com/drewgonzales360) made their first contribution in [#​699](https://github.com/go-co-op/gocron/pull/699) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.2.6...v2.2.7> ### [`v2.2.6`](https://github.com/go-co-op/gocron/releases/tag/v2.2.6) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.2.5...v2.2.6) #### What's Changed - Bump github.com/stretchr/testify from 1.8.4 to 1.9.0 by [@​dependabot](https://github.com/dependabot) in [#​684](https://github.com/go-co-op/gocron/pull/684) - elector & locker were failing to send out when not leader by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​688](https://github.com/go-co-op/gocron/pull/688) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.2.5...v2.2.6> ### [`v2.2.5`](https://github.com/go-co-op/gocron/releases/tag/v2.2.5) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.2.4...v2.2.5) #### What's Changed - remove codecov by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​672](https://github.com/go-co-op/gocron/pull/672) - Bump golangci/golangci-lint-action from 3.7.0 to 4.0.0 by [@​dependabot](https://github.com/dependabot) in [#​675](https://github.com/go-co-op/gocron/pull/675) - fix cases where default on send out is resulting in job not going out by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​686](https://github.com/go-co-op/gocron/pull/686) - This fixes two bugs related to limit mode and singleton mode having jobs stop running **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.2.4...v2.2.5> ### [`v2.2.4`](https://github.com/go-co-op/gocron/releases/tag/v2.2.4) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.2.3...v2.2.4) #### What's Changed - correct AfterJobRuns doc by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​670](https://github.com/go-co-op/gocron/pull/670) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.2.3...v2.2.4> ### [`v2.2.3`](https://github.com/go-co-op/gocron/releases/tag/v2.2.3) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.2.2...v2.2.3) #### What's Changed - fix RunNow() when calling from a job returned by Jobs() by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​668](https://github.com/go-co-op/gocron/pull/668) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.2.2...v2.2.3> ### [`v2.2.2`](https://github.com/go-co-op/gocron/releases/tag/v2.2.2) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.2.1...v2.2.2) #### What's Changed - Bump github.com/google/uuid from 1.5.0 to 1.6.0 by [@​dependabot](https://github.com/dependabot) in [#​664](https://github.com/go-co-op/gocron/pull/664) - fix unsafe map usage in singletonMode by [@​JohnRoesler](https://github.com/JohnRoesler) & [@​a3sroot](https://github.com/a3sroot) in [#​665](https://github.com/go-co-op/gocron/pull/665) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.2.1...v2.2.2> ### [`v2.2.1`](https://github.com/go-co-op/gocron/releases/tag/v2.2.1) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.2.0...v2.2.1) #### What's Changed - fix monthly jobs when counting days from the end by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​662](https://github.com/go-co-op/gocron/pull/662) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.2.0...v2.2.1> ### [`v2.2.0`](https://github.com/go-co-op/gocron/releases/tag/v2.2.0) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.1.2...v2.2.0) #### What's Changed - wait for new job to be fully created before returning by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​658](https://github.com/go-co-op/gocron/pull/658) - BETA FEATURE: Add job monitor interface to allow for collecting job metrics by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​659](https://github.com/go-co-op/gocron/pull/659) - This is the first release of the monitor feature - it may be changed as initial implementations are created and feedback comes in **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.1.2...v2.2.0> ### [`v2.1.2`](https://github.com/go-co-op/gocron/releases/tag/v2.1.2) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.1.1...v2.1.2) #### Fixes - fix to handle when next ends up in the past by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​650](https://github.com/go-co-op/gocron/pull/650) - make the order of the returned jobs slice deterministic by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​652](https://github.com/go-co-op/gocron/pull/652) #### Documentation - refactor: fix indent by [@​leedrum](https://github.com/leedrum) in [#​649](https://github.com/go-co-op/gocron/pull/649) #### New Contributors - [@​leedrum](https://github.com/leedrum) made their first contribution in [#​649](https://github.com/go-co-op/gocron/pull/649) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.1.1...v2.1.2> ### [`v2.1.1`](https://github.com/go-co-op/gocron/releases/tag/v2.1.1) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.1.0...v2.1.1) #### What's Changed - [bump golang.org/x/exp](https://github.com/go-co-op/gocron/commit/7ee4c50f5785121eb4b5fb37ea79d13334c2143e) - [fixup Job and Scheduler interface docs](https://github.com/go-co-op/gocron/commit/a51820e30f6657d908f7051ceb92091c4abe6b8e) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.1.0...v2.1.1> ### [`v2.1.0`](https://github.com/go-co-op/gocron/releases/tag/v2.1.0) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.0.3...v2.1.0) #### What's Changed - add new features, OneTimeJob and Job.RunNow() by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​646](https://github.com/go-co-op/gocron/pull/646) #### Version bumps - Bump github/codeql-action from 2 to 3 by [@​dependabot](https://github.com/dependabot) in [#​644](https://github.com/go-co-op/gocron/pull/644) - Bump github.com/google/uuid from 1.4.0 to 1.5.0 by [@​dependabot](https://github.com/dependabot) in [#​645](https://github.com/go-co-op/gocron/pull/645) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.0.3...v2.1.0> ### [`v2.0.3`](https://github.com/go-co-op/gocron/releases/tag/v2.0.3) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.0.2...v2.0.3) #### Fixes - fix weekly and monthly to handle midnight by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​643](https://github.com/go-co-op/gocron/pull/643) [#​642](https://github.com/go-co-op/gocron/issues/642) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.0.2...v2.0.3> ### [`v2.0.2`](https://github.com/go-co-op/gocron/releases/tag/v2.0.2) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.0.1...v2.0.2) #### Fixes - fix: check function param length and type by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​638](https://github.com/go-co-op/gocron/pull/638) raised in [#​637](https://github.com/go-co-op/gocron/issues/637) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.0.1...v2.0.2> ### [`v2.0.1`](https://github.com/go-co-op/gocron/releases/tag/v2.0.1) [Compare Source](https://github.com/go-co-op/gocron/compare/v2.0.0...v2.0.1) #### Fixes - daily job next logic failed to consider 1 midnight attime by [@​JohnRoesler](https://github.com/JohnRoesler) in [#​635](https://github.com/go-co-op/gocron/pull/635) #### Bumps - Bump actions/checkout from 3 to 4 by [@​dependabot](https://github.com/dependabot) in [#​631](https://github.com/go-co-op/gocron/pull/631) - Bump actions/setup-go from 4 to 5 by [@​dependabot](https://github.com/dependabot) in [#​630](https://github.com/go-co-op/gocron/pull/630) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.0.0...v2.0.1> ### [`v2.0.0`](https://github.com/go-co-op/gocron/releases/tag/v2.0.0) [Compare Source](https://github.com/go-co-op/gocron/compare/v1.37.0...v2.0.0) #### v2.0.0 It's here! 🎉 Take a look at the readme and godoc to see how the new version works! Please give feedback! (Reach out on slack if you're interested in contributing so we can coordinate work 😄 ) And open issues if you find any bugs or have features you'd like to see supported! #### New Contributors - [@​AlphaNecron](https://github.com/AlphaNecron) made their first contribution in [#​613](https://github.com/go-co-op/gocron/pull/613) **Full Changelog**: <https://github.com/go-co-op/gocron/compare/v2.0.0-alpha-1...v2.0.0> </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi4xMC41IiwidXBkYXRlZEluVmVyIjoiNDMuMjYzLjkiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=--> --------- Co-authored-by: Timo Behrendt <t.behrendt@t00n.de> Reviewed-on: https://gitea.t000-n.de/t.behrendt/realDynDNS/pulls/56 Reviewed-by: t.behrendt <2+t.behrendt@noreply.localhost> Co-authored-by: Renovate Bot <renovate@t00n.de> Co-committed-by: Renovate Bot <renovate@t00n.de>
This commit was merged in pull request #56.
This commit is contained in:
@@ -4,7 +4,7 @@ go 1.25.0
|
|||||||
|
|
||||||
require (
|
require (
|
||||||
gitea.t000-n.de/t.behrendt/ionosDnsClient v1.0.2
|
gitea.t000-n.de/t.behrendt/ionosDnsClient v1.0.2
|
||||||
github.com/go-co-op/gocron v1.37.0
|
github.com/go-co-op/gocron/v2 v2.22.0
|
||||||
gopkg.in/yaml.v3 v3.0.1
|
gopkg.in/yaml.v3 v3.0.1
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -12,10 +12,10 @@ require (
|
|||||||
github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
|
github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
|
||||||
github.com/google/uuid v1.6.0 // indirect
|
github.com/google/uuid v1.6.0 // indirect
|
||||||
github.com/jandelgado/gcov2lcov v1.1.1 // indirect
|
github.com/jandelgado/gcov2lcov v1.1.1 // indirect
|
||||||
|
github.com/jonboulle/clockwork v0.5.0 // indirect
|
||||||
|
github.com/kr/pretty v0.3.1 // indirect
|
||||||
github.com/oapi-codegen/runtime v1.1.1 // indirect
|
github.com/oapi-codegen/runtime v1.1.1 // indirect
|
||||||
github.com/robfig/cron/v3 v3.0.1 // indirect
|
github.com/robfig/cron/v3 v3.0.1 // indirect
|
||||||
github.com/stretchr/testify v1.11.1 // indirect
|
|
||||||
go.uber.org/atomic v1.11.0 // indirect
|
|
||||||
golang.org/x/lint v0.0.0-20241112194109-818c5a804067 // indirect
|
golang.org/x/lint v0.0.0-20241112194109-818c5a804067 // indirect
|
||||||
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7 // indirect
|
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7 // indirect
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -8,20 +8,17 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3
|
|||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/go-co-op/gocron v1.37.0 h1:ZYDJGtQ4OMhTLKOKMIch+/CY70Brbb1dGdooLEhh7b0=
|
github.com/go-co-op/gocron/v2 v2.22.0 h1:uEuH2F7k7VoESb1BYSaffuuV+T0kkpzsC0aXk7/z79I=
|
||||||
github.com/go-co-op/gocron v1.37.0/go.mod h1:3L/n6BkO7ABj+TrfSVXLRzsP26zmikL4ISkLQ0O8iNY=
|
github.com/go-co-op/gocron/v2 v2.22.0/go.mod h1:hiH/U9RMhTi1BBZJmef9s3KC9QwhpBF6PFrvUKaXY9M=
|
||||||
github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
|
||||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||||
github.com/jandelgado/gcov2lcov v1.1.1 h1:CHUNoAglvb34DqmMoZchnzDbA3yjpzT8EoUvVqcAY+s=
|
github.com/jandelgado/gcov2lcov v1.1.1 h1:CHUNoAglvb34DqmMoZchnzDbA3yjpzT8EoUvVqcAY+s=
|
||||||
github.com/jandelgado/gcov2lcov v1.1.1/go.mod h1:tMVUlMVtS1po2SB8UkADWhOT5Y5Q13XOce2AYU69JuI=
|
github.com/jandelgado/gcov2lcov v1.1.1/go.mod h1:tMVUlMVtS1po2SB8UkADWhOT5Y5Q13XOce2AYU69JuI=
|
||||||
|
github.com/jonboulle/clockwork v0.5.0 h1:Hyh9A8u51kptdkR+cqRpT1EebBwTn1oK9YfGYbdFz6I=
|
||||||
|
github.com/jonboulle/clockwork v0.5.0/go.mod h1:3mZlmanh0g2NDKO5TWZVJAfofYk64M7XN3SzBPjZF60=
|
||||||
github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE=
|
github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE=
|
||||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
||||||
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
|
||||||
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
|
|
||||||
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
|
|
||||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
|
||||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
|
||||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||||
github.com/oapi-codegen/runtime v1.1.1 h1:EXLHh0DXIJnWhdRPN2w4MXAzFyE4CskzhNLUmtpMYro=
|
github.com/oapi-codegen/runtime v1.1.1 h1:EXLHh0DXIJnWhdRPN2w4MXAzFyE4CskzhNLUmtpMYro=
|
||||||
@@ -31,9 +28,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
|
|||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
|
github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
|
||||||
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
|
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
|
||||||
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
|
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
|
||||||
github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg=
|
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
|
||||||
github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o=
|
|
||||||
github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0=
|
github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0=
|
||||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||||
@@ -42,14 +38,12 @@ github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/
|
|||||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||||
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
|
||||||
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||||
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||||
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
|
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
|
||||||
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
|
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
|
||||||
go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
|
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||||
go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
|
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
|
||||||
go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
|
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||||
golang.org/x/lint v0.0.0-20241112194109-818c5a804067 h1:adDmSQyFTCiv19j015EGKJBoaa7ElV0Q1Wovb/4G7NA=
|
golang.org/x/lint v0.0.0-20241112194109-818c5a804067 h1:adDmSQyFTCiv19j015EGKJBoaa7ElV0Q1Wovb/4G7NA=
|
||||||
@@ -65,10 +59,8 @@ golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7 h1:EBZoQjiKKPaLbPrbpssUfuH
|
|||||||
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
||||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
|
||||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
|
||||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
|
|||||||
@@ -128,8 +128,14 @@ func main() {
|
|||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.Info("Next run:", slog.String("time", job.NextRun().String()))
|
nextRun, err := job.NextRun()
|
||||||
schedule.StartBlocking()
|
if err != nil {
|
||||||
|
logger.Error("Failed to get next run", slog.String("error", err.Error()))
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
logger.Info("Next run:", slog.String("time", nextRun.String()))
|
||||||
|
defer schedule.Shutdown()
|
||||||
|
schedule.Start()
|
||||||
case config.RunOnceMode:
|
case config.RunOnceMode:
|
||||||
logger.Info("Running in run once mode")
|
logger.Info("Running in run once mode")
|
||||||
|
|
||||||
|
|||||||
@@ -4,14 +4,13 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"log/slog"
|
"log/slog"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
|
||||||
|
|
||||||
"realdnydns/pkg/config"
|
"realdnydns/pkg/config"
|
||||||
"realdnydns/pkg/dnsProvider"
|
"realdnydns/pkg/dnsProvider"
|
||||||
"realdnydns/pkg/externalIpProvider"
|
"realdnydns/pkg/externalIpProvider"
|
||||||
"realdnydns/pkg/notificationProvider"
|
"realdnydns/pkg/notificationProvider"
|
||||||
|
|
||||||
"github.com/go-co-op/gocron"
|
gocron "github.com/go-co-op/gocron/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ChangeDetector struct {
|
type ChangeDetector struct {
|
||||||
@@ -38,19 +37,26 @@ func New(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *ChangeDetector) RunWithSchedule(checkInterval string) (*gocron.Scheduler, *gocron.Job, error) {
|
func (c *ChangeDetector) RunWithSchedule(checkInterval string) (gocron.Scheduler, gocron.Job, error) {
|
||||||
s := gocron.NewScheduler(time.UTC)
|
s, err := gocron.NewScheduler()
|
||||||
s.SingletonMode()
|
if err != nil {
|
||||||
s.CronWithSeconds(checkInterval)
|
return nil, nil, err
|
||||||
|
}
|
||||||
|
|
||||||
job, err := s.DoWithJobDetails(func(job gocron.Job) {
|
job, err := s.NewJob(
|
||||||
numberChanged, err := c.detectAndApplyChanges()
|
gocron.CronJob(checkInterval, true),
|
||||||
if err != nil {
|
gocron.NewTask(func(job gocron.Job) {
|
||||||
panic(err)
|
numberChanged, err := c.detectAndApplyChanges()
|
||||||
}
|
if err != nil {
|
||||||
fmt.Printf("Number of changes: %d\n", numberChanged)
|
panic(err)
|
||||||
fmt.Println("Next run:", job.NextRun())
|
}
|
||||||
})
|
fmt.Printf("Number of changes: %d\n", numberChanged)
|
||||||
|
nextRun, err := job.NextRun()
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
fmt.Println("Next run:", nextRun)
|
||||||
|
}))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user