34 Commits

Author SHA1 Message Date
dc76c5fb26 chore(deps): update golang docker tag to v1.25 (#48)
All checks were successful
CD / Create tag (push) Successful in 9s
CD / test (push) Successful in 2m35s
CD / Build and push (amd64) (push) Successful in 41s
CD / Build and push (arm64) (push) Successful in 2m16s
CD / Create manifest (push) Successful in 47s
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| golang | stage | minor | `1.24-alpine` -> `1.25-alpine` |

---

### Configuration

📅 **Schedule**: 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 [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS44MS41IiwidXBkYXRlZEluVmVyIjoiNDIuMTAuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Reviewed-on: #48
Reviewed-by: branch-buddy <branch-buddy@t00n.de>
Co-authored-by: Renovate Bot <renovate@t00n.de>
Co-committed-by: Renovate Bot <renovate@t00n.de>
2025-12-12 21:42:46 +01:00
eb182ac7ce ci: add semver release (#60)
Reviewed-on: #60
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
2025-12-12 21:37:27 +01:00
ae6981cb02 ci: switch to native change detection (#59)
Reviewed-on: #59
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
2025-12-12 21:27:55 +01:00
6511147a41 chore(deps): update actions/checkout action to v6 (#57)
All checks were successful
CD / Check changes (push) Successful in 12s
CD / test (push) Successful in 43s
CD / Build and push (arm64) (push) Has been skipped
CD / Build and push (amd64) (push) Has been skipped
CD / Create manifest (push) Has been skipped
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/checkout](https://github.com/actions/checkout) | action | major | `v5` -> `v6` |

---

### Release Notes

<details>
<summary>actions/checkout (actions/checkout)</summary>

### [`v6`](https://github.com/actions/checkout/compare/v5...v6)

[Compare Source](https://github.com/actions/checkout/compare/v5...v6)

</details>

---

### Configuration

📅 **Schedule**: 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 [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi4xMC41IiwidXBkYXRlZEluVmVyIjoiNDIuMTAuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: #57
Reviewed-by: t.behrendt <t.behrendt@noreply.localhost>
Co-authored-by: Renovate Bot <renovate@t00n.de>
Co-committed-by: Renovate Bot <renovate@t00n.de>
2025-12-04 16:20:53 +01:00
2f05e48962 fix(deps): update module github.com/go-co-op/gocron to v2 (#39)
All checks were successful
CD / Check changes (push) Successful in 7s
CD / test (push) Successful in 1m51s
CD / Build and push (amd64) (push) Successful in 40s
CD / Build and push (arm64) (push) Successful in 2m36s
CD / Create manifest (push) Successful in 9s
This PR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
| [github.com/go-co-op/gocron](https://github.com/go-co-op/gocron) | `v1.37.0` -> `v2.18.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fgo-co-op%2fgocron/v2.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fgo-co-op%2fgocron/v1.37.0/v2.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>go-co-op/gocron (github.com/go-co-op/gocron)</summary>

### [`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 [#&#8203;565](https://github.com/go-co-op/gocron/issues/565)) by [@&#8203;iyashjayesh](https://github.com/iyashjayesh) in [#&#8203;884](https://github.com/go-co-op/gocron/pull/884)

#### Fixes

- fix: limit validation for WithLimitedRuns by [@&#8203;OsipovMax](https://github.com/OsipovMax) in [#&#8203;893](https://github.com/go-co-op/gocron/pull/893)

#### Chores

- doc: add v1 to v2 migration guide by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;890](https://github.com/go-co-op/gocron/pull/890)
- tests: add more daylight savings time tests by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;891](https://github.com/go-co-op/gocron/pull/891)
- docs: add Articles & Blog Posts section to README  by [@&#8203;iyashjayesh](https://github.com/iyashjayesh) in [#&#8203;886](https://github.com/go-co-op/gocron/pull/886)
- Bump github/codeql-action from 3 to 4 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;883](https://github.com/go-co-op/gocron/pull/883)

#### New Contributors

- [@&#8203;OsipovMax](https://github.com/OsipovMax) made their first contribution in [#&#8203;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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;882](https://github.com/go-co-op/gocron/pull/882)

#### Performance Improvements

- Reusing the results of reflections to improve performance by [@&#8203;apocelipes](https://github.com/apocelipes) in [#&#8203;873](https://github.com/go-co-op/gocron/pull/873)

#### Fixes

- fix: handle negative time.durations with error by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;878](https://github.com/go-co-op/gocron/pull/878)
- fix: multiple calls to shutdown should be no-op by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;880](https://github.com/go-co-op/gocron/pull/880)

#### Chores

- chore: go 1.23 is end of life - now go 1.24 by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;879](https://github.com/go-co-op/gocron/pull/879)
- Update README.md by [@&#8203;iyashjayesh](https://github.com/iyashjayesh) in [#&#8203;875](https://github.com/go-co-op/gocron/pull/875)

#### New Contributors

- [@&#8203;iyashjayesh](https://github.com/iyashjayesh) made their first contribution in [#&#8203;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 [@&#8203;sarff](https://github.com/sarff) in [#&#8203;872](https://github.com/go-co-op/gocron/pull/872)

#### Chores

- Bump actions/setup-go from 5 to 6 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;871](https://github.com/go-co-op/gocron/pull/871)

#### New Contributors

- [@&#8203;sarff](https://github.com/sarff) made their first contribution in [#&#8203;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 [@&#8203;apocelipes](https://github.com/apocelipes) in [#&#8203;870](https://github.com/go-co-op/gocron/pull/870)
- Add go1.25 tests by [@&#8203;apocelipes](https://github.com/apocelipes) in [#&#8203;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 [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;860](https://github.com/go-co-op/gocron/pull/860)
- Bump golang.org/x/crypto from 0.40.0 to 0.41.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;859](https://github.com/go-co-op/gocron/pull/859)
- Add comprehensive GitHub Copilot instructions for gocron development by [@&#8203;Copilot](https://github.com/Copilot) in [#&#8203;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 [@&#8203;Copilot](https://github.com/Copilot) in [#&#8203;864](https://github.com/go-co-op/gocron/pull/864)
- Bump testify by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;868](https://github.com/go-co-op/gocron/pull/868)

#### New Contributors

- [@&#8203;Copilot](https://github.com/Copilot) made their first contribution in [#&#8203;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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;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 [@&#8203;alexandear](https://github.com/alexandear) in [#&#8203;844](https://github.com/go-co-op/gocron/pull/844)
- go 1.23 & golangci-lint v2 by [@&#8203;dependabot](https://github.com/dependabot) in [#&#8203;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 [@&#8203;dependabot](https://github.com/dependabot) in [#&#8203;847](https://github.com/go-co-op/gocron/pull/847)
- chore: document the limitations with the locker design by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;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 [#&#8203;835](https://github.com/go-co-op/gocron/issues/835) and [#&#8203;837](https://github.com/go-co-op/gocron/issues/837) by [@&#8203;apocelipes](https://github.com/apocelipes) in [#&#8203;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 [@&#8203;Dojeto](https://github.com/Dojeto) in [#&#8203;834](https://github.com/go-co-op/gocron/pull/834)

#### Bug fixes

- fixes related to the bug where a job unexpectedly runs twice by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;810](https://github.com/go-co-op/gocron/pull/810)
- fix scheduler restart by [@&#8203;27149chen](https://github.com/27149chen) in [#&#8203;825](https://github.com/go-co-op/gocron/pull/825)
- removes nextRuns in the past when job skipped by locker [#&#8203;828](https://github.com/go-co-op/gocron/issues/828) by [@&#8203;manuelarte](https://github.com/manuelarte) in [#&#8203;829](https://github.com/go-co-op/gocron/pull/829)

#### Chores

- go to 1.21, upgrade deps by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;822](https://github.com/go-co-op/gocron/pull/822)
- replace "golang.org/x/exp" with standard libraries by [@&#8203;apocelipes](https://github.com/apocelipes) in [#&#8203;823](https://github.com/go-co-op/gocron/pull/823)
- Bump golangci/golangci-lint-action from 6.2.0 to 6.3.2 by [@&#8203;dependabot](https://github.com/dependabot) in [#&#8203;827](https://github.com/go-co-op/gocron/pull/827)
- fix err assertion in TestScheduler\_RemoveJob by [@&#8203;alexandear](https://github.com/alexandear) in [#&#8203;830](https://github.com/go-co-op/gocron/pull/830)
- Bump golangci/golangci-lint-action from 6.3.2 to 6.5.0 by [@&#8203;dependabot](https://github.com/dependabot) in [#&#8203;831](https://github.com/go-co-op/gocron/pull/831)
- re-enable goleak detection in ci by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;832](https://github.com/go-co-op/gocron/pull/832)
- chore: add go1.24 to ci by [@&#8203;apocelipes](https://github.com/apocelipes) in [#&#8203;833](https://github.com/go-co-op/gocron/pull/833)

#### New Contributors

- [@&#8203;alexandear](https://github.com/alexandear) made their first contribution in [#&#8203;830](https://github.com/go-co-op/gocron/pull/830)
- [@&#8203;Dojeto](https://github.com/Dojeto) made their first contribution in [#&#8203;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 [@&#8203;27149chen](https://github.com/27149chen) in [#&#8203;819](https://github.com/go-co-op/gocron/pull/819) & [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;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 [@&#8203;27149chen](https://github.com/27149chen) in [#&#8203;819](https://github.com/go-co-op/gocron/pull/819) & [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;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 [@&#8203;dependabot](https://github.com/dependabot) in [#&#8203;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 [@&#8203;seinshah](https://github.com/seinshah) in [#&#8203;811](https://github.com/go-co-op/gocron/pull/811)
- feat(event listener): introduce BeforeJobRunsSkipIfBeforeFuncErrors as a new Eventlistener by [@&#8203;FalcoSuessgott](https://github.com/FalcoSuessgott) in [#&#8203;813](https://github.com/go-co-op/gocron/pull/813)

#### New Contributors

- [@&#8203;seinshah](https://github.com/seinshah) made their first contribution in [#&#8203;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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;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 [@&#8203;dependabot](https://github.com/dependabot) in [#&#8203;801](https://github.com/go-co-op/gocron/pull/801)
- stop timeout timers when no longer needed by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;803](https://github.com/go-co-op/gocron/pull/803)
- feat(monitor): introduce MonitorStatus by [@&#8203;FalcoSuessgott](https://github.com/FalcoSuessgott) in [#&#8203;780](https://github.com/go-co-op/gocron/pull/780)

#### New Contributors

- [@&#8203;FalcoSuessgott](https://github.com/FalcoSuessgott) made their first contribution in [#&#8203;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 [@&#8203;dependabot](https://github.com/dependabot) in [#&#8203;781](https://github.com/go-co-op/gocron/pull/781)
- fix overly greedy panic handler by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;791](https://github.com/go-co-op/gocron/pull/791)
- weekly and monthly jobs should not allow zero interval by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;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 [@&#8203;rbroggi](https://github.com/rbroggi) in [#&#8203;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 [@&#8203;Higan](https://github.com/Higan) in [#&#8203;763](https://github.com/go-co-op/gocron/pull/763)
- handle crontab and return error with invalid day in a month by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;766](https://github.com/go-co-op/gocron/pull/766)
- Bump golangci/golangci-lint-action from 6.0.1 to 6.1.0 by [@&#8203;dependabot](https://github.com/dependabot) in [#&#8203;764](https://github.com/go-co-op/gocron/pull/764)
- fix: cleanup timers by [@&#8203;hayotbisonai](https://github.com/hayotbisonai) in [#&#8203;776](https://github.com/go-co-op/gocron/pull/776)

#### New Contributors

- [@&#8203;hayotbisonai](https://github.com/hayotbisonai) made their first contribution in [#&#8203;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 [@&#8203;Higan](https://github.com/Higan) in [#&#8203;760](https://github.com/go-co-op/gocron/pull/760)

#### Fixes

- Fix typo in security policy by [@&#8203;deining](https://github.com/deining) in [#&#8203;759](https://github.com/go-co-op/gocron/pull/759)

#### Internal

- internal refactoring by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;761](https://github.com/go-co-op/gocron/pull/761)

#### New Contributors

- [@&#8203;deining](https://github.com/deining) made their first contribution in [#&#8203;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 [@&#8203;apocelipes](https://github.com/apocelipes) in [#&#8203;757](https://github.com/go-co-op/gocron/pull/757)

#### New Contributors

- [@&#8203;apocelipes](https://github.com/apocelipes) made their first contribution in [#&#8203;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 [@&#8203;Higan](https://github.com/Higan) in [#&#8203;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 [@&#8203;samuelattwood](https://github.com/samuelattwood) in [#&#8203;752](https://github.com/go-co-op/gocron/pull/752)
- feat: add WithIdentifier() as new job option by [@&#8203;pcfreak30](https://github.com/pcfreak30) in [#&#8203;754](https://github.com/go-co-op/gocron/pull/754)

#### New Contributors

- [@&#8203;samuelattwood](https://github.com/samuelattwood) made their first contribution in [#&#8203;752](https://github.com/go-co-op/gocron/pull/752)
- [@&#8203;pcfreak30](https://github.com/pcfreak30) made their first contribution in [#&#8203;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 [@&#8203;Higan](https://github.com/Higan) in [#&#8203;749](https://github.com/go-co-op/gocron/pull/749)

#### New Contributors

- [@&#8203;Higan](https://github.com/Higan) made their first contribution in [#&#8203;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 [@&#8203;rbroggi](https://github.com/rbroggi) in [#&#8203;744](https://github.com/go-co-op/gocron/pull/744)
- fix jobs not starting on scheduler restart when using WithLimitConcurrentJobs by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;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 [@&#8203;rbroggi](https://github.com/rbroggi) in [#&#8203;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 [@&#8203;rbroggi](https://github.com/rbroggi) in [#&#8203;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 [@&#8203;manuelarte](https://github.com/manuelarte) in [#&#8203;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 [@&#8203;trungdlp-wolffun](https://github.com/trungdlp-wolffun) in [#&#8203;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 [@&#8203;rbroggi](https://github.com/rbroggi) in [#&#8203;739](https://github.com/go-co-op/gocron/pull/739)
- issue-736: moving validation of one-time to by [@&#8203;rbroggi](https://github.com/rbroggi) in [#&#8203;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 [@&#8203;dependabot](https://github.com/dependabot) in [#&#8203;730](https://github.com/go-co-op/gocron/pull/730)
- remove circleci config by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;735](https://github.com/go-co-op/gocron/pull/735)

#### New Contributors

- [@&#8203;manuelarte](https://github.com/manuelarte) made their first contribution in [#&#8203;734](https://github.com/go-co-op/gocron/pull/734)
- [@&#8203;trungdlp-wolffun](https://github.com/trungdlp-wolffun) made their first contribution in [#&#8203;733](https://github.com/go-co-op/gocron/pull/733)
- [@&#8203;rbroggi](https://github.com/rbroggi) made their first contribution in [#&#8203;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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;729](https://github.com/go-co-op/gocron/pull/729)
- Bump golangci/golangci-lint-action from 4.0.0 to 5.3.0 by [@&#8203;dependabot](https://github.com/dependabot) in [#&#8203;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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;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 [@&#8203;giri-vsr](https://github.com/giri-vsr) in [#&#8203;721](https://github.com/go-co-op/gocron/pull/721)
- don't trash the incoming slice, match what was done in NewAtTime by [@&#8203;cloudkucooland](https://github.com/cloudkucooland) in [#&#8203;724](https://github.com/go-co-op/gocron/pull/724)

#### New Contributors

- [@&#8203;cloudkucooland](https://github.com/cloudkucooland) made their first contribution in [#&#8203;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 [@&#8203;evgenymarkov](https://github.com/evgenymarkov) in [#&#8203;714](https://github.com/go-co-op/gocron/pull/714)
- Monitor: IncrementJob in case of skipped job run by [@&#8203;giri-vsr](https://github.com/giri-vsr) in [#&#8203;715](https://github.com/go-co-op/gocron/pull/715)
- fix mocks import path by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;720](https://github.com/go-co-op/gocron/pull/720)

#### New Contributors

- [@&#8203;evgenymarkov](https://github.com/evgenymarkov) made their first contribution in [#&#8203;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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;705](https://github.com/go-co-op/gocron/pull/705)
- Added Distributed Locker to JobOptions by [@&#8203;giri-vsr](https://github.com/giri-vsr) in [#&#8203;711](https://github.com/go-co-op/gocron/pull/711)

#### New Contributors

- [@&#8203;giri-vsr](https://github.com/giri-vsr) made their first contribution in [#&#8203;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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;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 [@&#8203;moyu-x](https://github.com/moyu-x) in [#&#8203;701](https://github.com/go-co-op/gocron/pull/701)
- properly report lastRun for limit type jobs and RunNow by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;700](https://github.com/go-co-op/gocron/pull/700)

#### New Contributors

- [@&#8203;moyu-x](https://github.com/moyu-x) made their first contribution in [#&#8203;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 [@&#8203;drewgonzales360](https://github.com/drewgonzales360) in [#&#8203;699](https://github.com/go-co-op/gocron/pull/699)
- fix case where job removed causes panic when rescheduling by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;698](https://github.com/go-co-op/gocron/pull/698)

#### New Contributors

- [@&#8203;drewgonzales360](https://github.com/drewgonzales360) made their first contribution in [#&#8203;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 [@&#8203;dependabot](https://github.com/dependabot) in [#&#8203;684](https://github.com/go-co-op/gocron/pull/684)
- elector & locker were failing to send out when not leader by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;672](https://github.com/go-co-op/gocron/pull/672)
- Bump golangci/golangci-lint-action from 3.7.0 to 4.0.0 by [@&#8203;dependabot](https://github.com/dependabot) in [#&#8203;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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;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 [@&#8203;dependabot](https://github.com/dependabot) in [#&#8203;664](https://github.com/go-co-op/gocron/pull/664)
- fix unsafe map usage in singletonMode by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) & [@&#8203;a3sroot](https://github.com/a3sroot) in [#&#8203;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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;658](https://github.com/go-co-op/gocron/pull/658)
- BETA FEATURE: Add job monitor interface to allow for collecting job metrics by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;650](https://github.com/go-co-op/gocron/pull/650)
- make the order of the returned jobs slice deterministic by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;652](https://github.com/go-co-op/gocron/pull/652)

#### Documentation

- refactor: fix indent by [@&#8203;leedrum](https://github.com/leedrum) in [#&#8203;649](https://github.com/go-co-op/gocron/pull/649)

#### New Contributors

- [@&#8203;leedrum](https://github.com/leedrum) made their first contribution in [#&#8203;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](7ee4c50f57)
- [fixup Job and Scheduler interface docs](a51820e30f)

**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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;646](https://github.com/go-co-op/gocron/pull/646)

#### Version bumps

- Bump github/codeql-action from 2 to 3 by [@&#8203;dependabot](https://github.com/dependabot) in [#&#8203;644](https://github.com/go-co-op/gocron/pull/644)
- Bump github.com/google/uuid from 1.4.0 to 1.5.0 by [@&#8203;dependabot](https://github.com/dependabot) in [#&#8203;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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;643](https://github.com/go-co-op/gocron/pull/643) [#&#8203;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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;638](https://github.com/go-co-op/gocron/pull/638) raised in [#&#8203;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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in [#&#8203;635](https://github.com/go-co-op/gocron/pull/635)

#### Bumps

- Bump actions/checkout from 3 to 4 by [@&#8203;dependabot](https://github.com/dependabot) in [#&#8203;631](https://github.com/go-co-op/gocron/pull/631)
- Bump actions/setup-go from 4 to 5 by [@&#8203;dependabot](https://github.com/dependabot) in [#&#8203;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

- [@&#8203;AlphaNecron](https://github.com/AlphaNecron) made their first contribution in [#&#8203;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**: 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 [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNjMuMSIsInVwZGF0ZWRJblZlciI6IjQyLjEuMyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: https://gitea.t000-n.de/t.behrendt/realDynDNS/pulls/39
Reviewed-by: t.behrendt <t.behrendt@noreply.localhost>
Co-authored-by: Renovate Bot <renovate@t00n.de>
Co-committed-by: Renovate Bot <renovate@t00n.de>
2025-11-12 21:42:49 +01:00
a79ce64e82 fix(externalIpProvider/plain): when reading response body (#54)
All checks were successful
CD / Check changes (push) Successful in 6s
CD / test (push) Successful in 2m48s
CD / Build and push (amd64) (push) Successful in 40s
CD / Build and push (arm64) (push) Successful in 2m40s
CD / Create manifest (push) Successful in 8s
Fixing an error where the service crashes reading the response body, when no content-length header was provided in the response.

Reviewed-on: #54
Reviewed-by: branch-buddy <branch-buddy@t00n.de>
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
2025-11-07 17:14:14 +01:00
660f2eac0d chore(deps): update actions/setup-go action to v6 (#52)
All checks were successful
CD / Check changes (push) Successful in 12s
CD / test (push) Successful in 1m50s
CD / Build and push (arm64) (push) Has been skipped
CD / Build and push (amd64) (push) Has been skipped
CD / Create manifest (push) Has been skipped
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/setup-go](https://github.com/actions/setup-go) | action | major | `v5` -> `v6` |

---

### Release Notes

<details>
<summary>actions/setup-go (actions/setup-go)</summary>

### [`v6`](https://github.com/actions/setup-go/compare/v5...v6)

[Compare Source](https://github.com/actions/setup-go/compare/v5...v6)

</details>

---

### Configuration

📅 **Schedule**: 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 [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS45NS4wIiwidXBkYXRlZEluVmVyIjoiNDEuOTUuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: #52
Reviewed-by: t.behrendt <t.behrendt@noreply.localhost>
Co-authored-by: Renovate Bot <renovate@t00n.de>
Co-committed-by: Renovate Bot <renovate@t00n.de>
2025-09-04 07:28:46 +02:00
0a722ff1b2 chore(deps): update actions/checkout action to v5 (#44)
All checks were successful
CD / Check changes (push) Successful in 7s
CD / test (push) Successful in 2m0s
CD / Build and push (arm64) (push) Has been skipped
CD / Build and push (amd64) (push) Has been skipped
CD / Create manifest (push) Has been skipped
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/checkout](https://github.com/actions/checkout) | action | major | `v4` -> `v5` |

---

### Release Notes

<details>
<summary>actions/checkout (actions/checkout)</summary>

### [`v5`](https://github.com/actions/checkout/compare/v4...v5)

[Compare Source](https://github.com/actions/checkout/compare/v4...v5)

</details>

---

### Configuration

📅 **Schedule**: 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 [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS42Mi4xIiwidXBkYXRlZEluVmVyIjoiNDEuOTEuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: #44
Reviewed-by: t.behrendt <t.behrendt@noreply.localhost>
Co-authored-by: Renovate Bot <renovate@t00n.de>
Co-committed-by: Renovate Bot <renovate@t00n.de>
2025-08-31 17:50:38 +02:00
5875af55bb ci: chore try out new renovate config (#50)
All checks were successful
CD / Check changes (push) Successful in 10s
CD / test (push) Successful in 2m53s
CD / Build and push (arm64) (push) Has been skipped
CD / Build and push (amd64) (push) Has been skipped
CD / Create manifest (push) Has been skipped
Reviewed-on: #50
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
2025-08-25 18:31:33 +02:00
bff59f36a8 chore: fixup go.mod (#49)
All checks were successful
CD / Check changes (push) Successful in 13s
CD / test (push) Successful in 2m22s
CD / Build and push (amd64) (push) Successful in 2m7s
CD / Build and push (arm64) (push) Successful in 7m4s
CD / Create manifest (push) Successful in 8s
- Drop toolchain
- Sync go version with docker image

Reviewed-on: #49
Co-authored-by: t.behrendt <t.behrendt@t00n.de>
Co-committed-by: t.behrendt <t.behrendt@t00n.de>
2025-08-25 12:50:33 +02:00
73615c65ee ci: chore adjust renovate to combine go toolchain and go docker updates (#47)
All checks were successful
CD / Check changes (push) Successful in 11s
CD / test (push) Successful in 14m12s
CD / Build and push (arm64) (push) Has been skipped
CD / Build and push (amd64) (push) Has been skipped
CD / Create manifest (push) Has been skipped
Reviewed-on: #47
Co-authored-by: t.behrendt <t.behrendt@t00n.de>
Co-committed-by: t.behrendt <t.behrendt@t00n.de>
2025-08-20 09:51:02 +02:00
531b5baecd chore(deps): update dependency go to v1.24.6 (#43)
All checks were successful
CD / Check changes (push) Successful in 9s
CD / test (push) Successful in 14m23s
CD / Build and push (amd64) (push) Successful in 1m52s
CD / Build and push (arm64) (push) Successful in 6m28s
CD / Create manifest (push) Successful in 20s
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [go](https://go.dev/) ([source](https://github.com/golang/go)) | toolchain | patch | `1.24.5` -> `1.24.6` |

---

### Configuration

📅 **Schedule**: 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 [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS41NC4wIiwidXBkYXRlZEluVmVyIjoiNDEuNTQuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: #43
Reviewed-by: t.behrendt <t.behrendt@noreply.localhost>
Co-authored-by: Renovate Bot <renovate@t00n.de>
Co-committed-by: Renovate Bot <renovate@t00n.de>
2025-08-07 07:51:56 +02:00
629765985b chore(deps): update dependency go to v1.24.5 (#41)
All checks were successful
CD / Check changes (push) Successful in 6s
CD / test (push) Successful in 3m54s
CD / Build and push (amd64) (push) Successful in 38s
CD / Build and push (arm64) (push) Successful in 2m59s
CD / Create manifest (push) Successful in 9s
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [go](https://go.dev/) ([source](https://github.com/golang/go)) | toolchain | patch | `1.24.4` -> `1.24.5` |

---

### Configuration

📅 **Schedule**: 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 [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNjMuMSIsInVwZGF0ZWRJblZlciI6IjM5LjI2My4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: #41
Co-authored-by: Renovate Bot <renovate@t00n.de>
Co-committed-by: Renovate Bot <renovate@t00n.de>
2025-07-08 21:38:48 +02:00
99e1214a83 chore(deps): update module github.com/go-co-op/gocron to v2 (#36)
All checks were successful
CD / Check changes (push) Successful in 7s
CD / test (push) Successful in 4m52s
CD / Build and push (amd64) (push) Successful in 46s
CD / Build and push (arm64) (push) Successful in 3m0s
CD / Create manifest (push) Successful in 11s
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/go-co-op/gocron](https://github.com/go-co-op/gocron) | require | major | `v1.37.0` -> `v2.16.2` |

---

### Release Notes

<details>
<summary>go-co-op/gocron (github.com/go-co-op/gocron)</summary>

### [`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 [@&#8203;alexandear](https://github.com/alexandear) in https://github.com/go-co-op/gocron/pull/844
-   go 1.23 & golangci-lint v2 by [@&#8203;dependabot](https://github.com/dependabot) in 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 [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/go-co-op/gocron/pull/847
-   chore: document the limitations with the locker design by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in 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 [#&#8203;835](https://github.com/go-co-op/gocron/issues/835) and [#&#8203;837](https://github.com/go-co-op/gocron/issues/837) by [@&#8203;apocelipes](https://github.com/apocelipes) in 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 [@&#8203;Dojeto](https://github.com/Dojeto) in https://github.com/go-co-op/gocron/pull/834

#### Bug fixes

-   fixes related to the bug where a job unexpectedly runs twice by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/810
-   fix scheduler restart by [@&#8203;27149chen](https://github.com/27149chen) in https://github.com/go-co-op/gocron/pull/825
-   removes nextRuns in the past when job skipped by locker [#&#8203;828](https://github.com/go-co-op/gocron/issues/828) by [@&#8203;manuelarte](https://github.com/manuelarte) in https://github.com/go-co-op/gocron/pull/829

#### Chores

-   go to 1.21, upgrade deps by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/822
-   replace "golang.org/x/exp" with standard libraries by [@&#8203;apocelipes](https://github.com/apocelipes) in https://github.com/go-co-op/gocron/pull/823
-   Bump golangci/golangci-lint-action from 6.2.0 to 6.3.2 by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/go-co-op/gocron/pull/827
-   fix err assertion in TestScheduler_RemoveJob by [@&#8203;alexandear](https://github.com/alexandear) in https://github.com/go-co-op/gocron/pull/830
-   Bump golangci/golangci-lint-action from 6.3.2 to 6.5.0 by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/go-co-op/gocron/pull/831
-   re-enable goleak detection in ci by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/832
-   chore: add go1.24 to ci by [@&#8203;apocelipes](https://github.com/apocelipes) in https://github.com/go-co-op/gocron/pull/833

#### New Contributors

-   [@&#8203;alexandear](https://github.com/alexandear) made their first contribution in https://github.com/go-co-op/gocron/pull/830
-   [@&#8203;Dojeto](https://github.com/Dojeto) made their first contribution in 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 [@&#8203;27149chen](https://github.com/27149chen) in https://github.com/go-co-op/gocron/pull/819 & [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in 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 [@&#8203;27149chen](https://github.com/27149chen) in https://github.com/go-co-op/gocron/pull/819 & [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in 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 [@&#8203;dependabot](https://github.com/dependabot) in 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 [@&#8203;seinshah](https://github.com/seinshah) in https://github.com/go-co-op/gocron/pull/811
-   feat(event listener): introduce BeforeJobRunsSkipIfBeforeFuncErrors as a new Eventlistener by [@&#8203;FalcoSuessgott](https://github.com/FalcoSuessgott) in https://github.com/go-co-op/gocron/pull/813

#### New Contributors

-   [@&#8203;seinshah](https://github.com/seinshah) made their first contribution in 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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in 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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in 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 [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/go-co-op/gocron/pull/801
-   stop timeout timers when no longer needed by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/803
-   feat(monitor): introduce MonitorStatus by [@&#8203;FalcoSuessgott](https://github.com/FalcoSuessgott) in https://github.com/go-co-op/gocron/pull/780

#### New Contributors

-   [@&#8203;FalcoSuessgott](https://github.com/FalcoSuessgott) made their first contribution in 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 [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/go-co-op/gocron/pull/781
-   fix overly greedy panic handler by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in 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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in 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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/791
-   weekly and monthly jobs should not allow zero interval by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in 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 [@&#8203;rbroggi](https://github.com/rbroggi) in 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 [@&#8203;Higan](https://github.com/Higan) in https://github.com/go-co-op/gocron/pull/763
-   handle crontab and return error with invalid day in a month by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/766
-   Bump golangci/golangci-lint-action from 6.0.1 to 6.1.0 by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/go-co-op/gocron/pull/764
-   fix: cleanup timers by [@&#8203;hayotbisonai](https://github.com/hayotbisonai) in https://github.com/go-co-op/gocron/pull/776

#### New Contributors

-   [@&#8203;hayotbisonai](https://github.com/hayotbisonai) made their first contribution in 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 [@&#8203;Higan](https://github.com/Higan) in https://github.com/go-co-op/gocron/pull/760

#### Fixes

-   Fix typo in security policy by [@&#8203;deining](https://github.com/deining) in https://github.com/go-co-op/gocron/pull/759

#### Internal

-   internal refactoring by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/761

#### New Contributors

-   [@&#8203;deining](https://github.com/deining) made their first contribution in 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 [@&#8203;apocelipes](https://github.com/apocelipes) in https://github.com/go-co-op/gocron/pull/757

#### New Contributors

-   [@&#8203;apocelipes](https://github.com/apocelipes) made their first contribution in 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 [@&#8203;Higan](https://github.com/Higan) in 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 [@&#8203;samuelattwood](https://github.com/samuelattwood) in https://github.com/go-co-op/gocron/pull/752
-   feat: add WithIdentifier() as new job option by [@&#8203;pcfreak30](https://github.com/pcfreak30) in https://github.com/go-co-op/gocron/pull/754

#### New Contributors

-   [@&#8203;samuelattwood](https://github.com/samuelattwood) made their first contribution in https://github.com/go-co-op/gocron/pull/752
-   [@&#8203;pcfreak30](https://github.com/pcfreak30) made their first contribution in 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 [@&#8203;Higan](https://github.com/Higan) in https://github.com/go-co-op/gocron/pull/749

#### New Contributors

-   [@&#8203;Higan](https://github.com/Higan) made their first contribution in 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 [@&#8203;rbroggi](https://github.com/rbroggi) in https://github.com/go-co-op/gocron/pull/744
-   fix jobs not starting on scheduler restart when using WithLimitConcurrentJobs by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in 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 [@&#8203;rbroggi](https://github.com/rbroggi) in 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 [@&#8203;rbroggi](https://github.com/rbroggi) in 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 [@&#8203;manuelarte](https://github.com/manuelarte) in 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 [@&#8203;trungdlp-wolffun](https://github.com/trungdlp-wolffun) in 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 [@&#8203;rbroggi](https://github.com/rbroggi) in https://github.com/go-co-op/gocron/pull/739
-   issue-736: moving validation of one-time to by [@&#8203;rbroggi](https://github.com/rbroggi) in https://github.com/go-co-op/gocron/pull/737

#### Misc

-   Bump golangci/golangci-lint-action from 5.3.0 to 6.0.1 by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/go-co-op/gocron/pull/730
-   remove circleci config by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/735

#### New Contributors

-   [@&#8203;manuelarte](https://github.com/manuelarte) made their first contribution in https://github.com/go-co-op/gocron/pull/734
-   [@&#8203;trungdlp-wolffun](https://github.com/trungdlp-wolffun) made their first contribution in https://github.com/go-co-op/gocron/pull/733
-   [@&#8203;rbroggi](https://github.com/rbroggi) made their first contribution in 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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/729
-   Bump golangci/golangci-lint-action from 4.0.0 to 5.3.0 by [@&#8203;dependabot](https://github.com/dependabot) in 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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in 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 [@&#8203;giri-vsr](https://github.com/giri-vsr) in https://github.com/go-co-op/gocron/pull/721
-   don't trash the incoming slice, match what was done in NewAtTime by [@&#8203;cloudkucooland](https://github.com/cloudkucooland) in https://github.com/go-co-op/gocron/pull/724

#### New Contributors

-   [@&#8203;cloudkucooland](https://github.com/cloudkucooland) made their first contribution in 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 [@&#8203;evgenymarkov](https://github.com/evgenymarkov) in https://github.com/go-co-op/gocron/pull/714
-   Monitor: IncrementJob in case of skipped job run by [@&#8203;giri-vsr](https://github.com/giri-vsr) in https://github.com/go-co-op/gocron/pull/715
-   fix mocks import path by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/720

#### New Contributors

-   [@&#8203;evgenymarkov](https://github.com/evgenymarkov) made their first contribution in 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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/705
-   Added Distributed Locker to JobOptions by [@&#8203;giri-vsr](https://github.com/giri-vsr) in https://github.com/go-co-op/gocron/pull/711

#### New Contributors

-   [@&#8203;giri-vsr](https://github.com/giri-vsr) made their first contribution in 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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in 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 [@&#8203;moyu-x](https://github.com/moyu-x) in https://github.com/go-co-op/gocron/pull/701
-   properly report lastRun for limit type jobs and RunNow by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/700

#### New Contributors

-   [@&#8203;moyu-x](https://github.com/moyu-x) made their first contribution in 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 [@&#8203;drewgonzales360](https://github.com/drewgonzales360) in https://github.com/go-co-op/gocron/pull/699
-   fix case where job removed causes panic when rescheduling by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/698

#### New Contributors

-   [@&#8203;drewgonzales360](https://github.com/drewgonzales360) made their first contribution in 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 [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/go-co-op/gocron/pull/684
-   elector & locker were failing to send out when not leader by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in 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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/672
-   Bump golangci/golangci-lint-action from 3.7.0 to 4.0.0 by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/go-co-op/gocron/pull/675
-   fix cases where default on send out is resulting in job not going out by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in 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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in 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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in 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 [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/go-co-op/gocron/pull/664
-   fix unsafe map usage in singletonMode by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) & [@&#8203;a3sroot](https://github.com/a3sroot) in 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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in 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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/658
-   BETA FEATURE: Add job monitor interface to allow for collecting job metrics by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in 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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/650
-   make the order of the returned jobs slice deterministic by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/652

#### Documentation

-   refactor: fix indent by [@&#8203;leedrum](https://github.com/leedrum) in https://github.com/go-co-op/gocron/pull/649

#### New Contributors

-   [@&#8203;leedrum](https://github.com/leedrum) made their first contribution in 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](7ee4c50f57)
-   [fixup Job and Scheduler interface docs](a51820e30f)

**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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/646

#### Version bumps

-   Bump github/codeql-action from 2 to 3 by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/go-co-op/gocron/pull/644
-   Bump github.com/google/uuid from 1.4.0 to 1.5.0 by [@&#8203;dependabot](https://github.com/dependabot) in 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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/643 [#&#8203;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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/638 raised in [#&#8203;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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/635

#### Bumps

-   Bump actions/checkout from 3 to 4 by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/go-co-op/gocron/pull/631
-   Bump actions/setup-go from 4 to 5 by [@&#8203;dependabot](https://github.com/dependabot) in 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

-   [@&#8203;AlphaNecron](https://github.com/AlphaNecron) made their first contribution in 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**: 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 [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNDAuMSIsInVwZGF0ZWRJblZlciI6IjM5LjI2My4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: https://gitea.t000-n.de/t.behrendt/realDynDNS/pulls/36
Reviewed-by: t.behrendt <t.behrendt@noreply.localhost>
Co-authored-by: Renovate Bot <renovate@t00n.de>
Co-committed-by: Renovate Bot <renovate@t00n.de>
2025-06-06 11:53:22 +02:00
29c62a8b1f chore(deps): update golang docker tag to v1.24 (#31)
All checks were successful
CD / Check changes (push) Successful in 39s
CD / test (push) Successful in 48s
CD / Build and push (amd64) (push) Successful in 50s
CD / Build and push (arm64) (push) Successful in 3m7s
CD / Create manifest (push) Successful in 12s
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| golang | stage | minor | `1.23-alpine` -> `1.24-alpine` |

---

### Configuration

📅 **Schedule**: 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 [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNDAuMSIsInVwZGF0ZWRJblZlciI6IjM5LjI2Mi4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: #31
Reviewed-by: t.behrendt <t.behrendt@noreply.localhost>
Co-authored-by: Renovate Bot <renovate@t00n.de>
Co-committed-by: Renovate Bot <renovate@t00n.de>
2025-04-29 17:32:19 +02:00
0fdd151e6d ci: fix conditional build condition (#37)
All checks were successful
CD / Check changes (push) Successful in 7s
CD / test (push) Successful in 32s
CD / Build and push (amd64) (push) Has been skipped
CD / Build and push (arm64) (push) Has been skipped
CD / Create manifest (push) Has been skipped
Reviewed-on: #37
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
2025-04-13 19:07:41 +02:00
89d965a4d2 chore(deps): update module github.com/go-co-op/gocron to v2 (#35)
All checks were successful
CD / Check changes (push) Successful in 7s
CD / test (push) Successful in 1m6s
CD / Build and push (arm64) (push) Has been skipped
CD / Build and push (amd64) (push) Has been skipped
CD / Create manifest (push) Has been skipped
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/go-co-op/gocron](https://github.com/go-co-op/gocron) | require | major | `v1.37.0` -> `v2.16.1` |

---

### Release Notes

<details>
<summary>go-co-op/gocron (github.com/go-co-op/gocron)</summary>

### [`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 [#&#8203;835](https://github.com/go-co-op/gocron/issues/835) and [#&#8203;837](https://github.com/go-co-op/gocron/issues/837) by [@&#8203;apocelipes](https://github.com/apocelipes) in 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 [@&#8203;Dojeto](https://github.com/Dojeto) in https://github.com/go-co-op/gocron/pull/834

#### Bug fixes

-   fixes related to the bug where a job unexpectedly runs twice by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/810
-   fix scheduler restart by [@&#8203;27149chen](https://github.com/27149chen) in https://github.com/go-co-op/gocron/pull/825
-   removes nextRuns in the past when job skipped by locker [#&#8203;828](https://github.com/go-co-op/gocron/issues/828) by [@&#8203;manuelarte](https://github.com/manuelarte) in https://github.com/go-co-op/gocron/pull/829

#### Chores

-   go to 1.21, upgrade deps by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/822
-   replace "golang.org/x/exp" with standard libraries by [@&#8203;apocelipes](https://github.com/apocelipes) in https://github.com/go-co-op/gocron/pull/823
-   Bump golangci/golangci-lint-action from 6.2.0 to 6.3.2 by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/go-co-op/gocron/pull/827
-   fix err assertion in TestScheduler_RemoveJob by [@&#8203;alexandear](https://github.com/alexandear) in https://github.com/go-co-op/gocron/pull/830
-   Bump golangci/golangci-lint-action from 6.3.2 to 6.5.0 by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/go-co-op/gocron/pull/831
-   re-enable goleak detection in ci by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/832
-   chore: add go1.24 to ci by [@&#8203;apocelipes](https://github.com/apocelipes) in https://github.com/go-co-op/gocron/pull/833

#### New Contributors

-   [@&#8203;alexandear](https://github.com/alexandear) made their first contribution in https://github.com/go-co-op/gocron/pull/830
-   [@&#8203;Dojeto](https://github.com/Dojeto) made their first contribution in 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 [@&#8203;27149chen](https://github.com/27149chen) in https://github.com/go-co-op/gocron/pull/819 & [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in 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 [@&#8203;27149chen](https://github.com/27149chen) in https://github.com/go-co-op/gocron/pull/819 & [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in 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 [@&#8203;dependabot](https://github.com/dependabot) in 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 [@&#8203;seinshah](https://github.com/seinshah) in https://github.com/go-co-op/gocron/pull/811
-   feat(event listener): introduce BeforeJobRunsSkipIfBeforeFuncErrors as a new Eventlistener by [@&#8203;FalcoSuessgott](https://github.com/FalcoSuessgott) in https://github.com/go-co-op/gocron/pull/813

#### New Contributors

-   [@&#8203;seinshah](https://github.com/seinshah) made their first contribution in 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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in 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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in 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 [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/go-co-op/gocron/pull/801
-   stop timeout timers when no longer needed by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/803
-   feat(monitor): introduce MonitorStatus by [@&#8203;FalcoSuessgott](https://github.com/FalcoSuessgott) in https://github.com/go-co-op/gocron/pull/780

#### New Contributors

-   [@&#8203;FalcoSuessgott](https://github.com/FalcoSuessgott) made their first contribution in 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 [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/go-co-op/gocron/pull/781
-   fix overly greedy panic handler by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in 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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in 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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/791
-   weekly and monthly jobs should not allow zero interval by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in 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 [@&#8203;rbroggi](https://github.com/rbroggi) in 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 [@&#8203;Higan](https://github.com/Higan) in https://github.com/go-co-op/gocron/pull/763
-   handle crontab and return error with invalid day in a month by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/766
-   Bump golangci/golangci-lint-action from 6.0.1 to 6.1.0 by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/go-co-op/gocron/pull/764
-   fix: cleanup timers by [@&#8203;hayotbisonai](https://github.com/hayotbisonai) in https://github.com/go-co-op/gocron/pull/776

#### New Contributors

-   [@&#8203;hayotbisonai](https://github.com/hayotbisonai) made their first contribution in 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 [@&#8203;Higan](https://github.com/Higan) in https://github.com/go-co-op/gocron/pull/760

#### Fixes

-   Fix typo in security policy by [@&#8203;deining](https://github.com/deining) in https://github.com/go-co-op/gocron/pull/759

#### Internal

-   internal refactoring by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/761

#### New Contributors

-   [@&#8203;deining](https://github.com/deining) made their first contribution in 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 [@&#8203;apocelipes](https://github.com/apocelipes) in https://github.com/go-co-op/gocron/pull/757

#### New Contributors

-   [@&#8203;apocelipes](https://github.com/apocelipes) made their first contribution in 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 [@&#8203;Higan](https://github.com/Higan) in 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 [@&#8203;samuelattwood](https://github.com/samuelattwood) in https://github.com/go-co-op/gocron/pull/752
-   feat: add WithIdentifier() as new job option by [@&#8203;pcfreak30](https://github.com/pcfreak30) in https://github.com/go-co-op/gocron/pull/754

#### New Contributors

-   [@&#8203;samuelattwood](https://github.com/samuelattwood) made their first contribution in https://github.com/go-co-op/gocron/pull/752
-   [@&#8203;pcfreak30](https://github.com/pcfreak30) made their first contribution in 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 [@&#8203;Higan](https://github.com/Higan) in https://github.com/go-co-op/gocron/pull/749

#### New Contributors

-   [@&#8203;Higan](https://github.com/Higan) made their first contribution in 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 [@&#8203;rbroggi](https://github.com/rbroggi) in https://github.com/go-co-op/gocron/pull/744
-   fix jobs not starting on scheduler restart when using WithLimitConcurrentJobs by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in 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 [@&#8203;rbroggi](https://github.com/rbroggi) in 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 [@&#8203;rbroggi](https://github.com/rbroggi) in 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 [@&#8203;manuelarte](https://github.com/manuelarte) in 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 [@&#8203;trungdlp-wolffun](https://github.com/trungdlp-wolffun) in 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 [@&#8203;rbroggi](https://github.com/rbroggi) in https://github.com/go-co-op/gocron/pull/739
-   issue-736: moving validation of one-time to by [@&#8203;rbroggi](https://github.com/rbroggi) in https://github.com/go-co-op/gocron/pull/737

#### Misc

-   Bump golangci/golangci-lint-action from 5.3.0 to 6.0.1 by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/go-co-op/gocron/pull/730
-   remove circleci config by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/735

#### New Contributors

-   [@&#8203;manuelarte](https://github.com/manuelarte) made their first contribution in https://github.com/go-co-op/gocron/pull/734
-   [@&#8203;trungdlp-wolffun](https://github.com/trungdlp-wolffun) made their first contribution in https://github.com/go-co-op/gocron/pull/733
-   [@&#8203;rbroggi](https://github.com/rbroggi) made their first contribution in 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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/729
-   Bump golangci/golangci-lint-action from 4.0.0 to 5.3.0 by [@&#8203;dependabot](https://github.com/dependabot) in 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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in 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 [@&#8203;giri-vsr](https://github.com/giri-vsr) in https://github.com/go-co-op/gocron/pull/721
-   don't trash the incoming slice, match what was done in NewAtTime by [@&#8203;cloudkucooland](https://github.com/cloudkucooland) in https://github.com/go-co-op/gocron/pull/724

#### New Contributors

-   [@&#8203;cloudkucooland](https://github.com/cloudkucooland) made their first contribution in 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 [@&#8203;evgenymarkov](https://github.com/evgenymarkov) in https://github.com/go-co-op/gocron/pull/714
-   Monitor: IncrementJob in case of skipped job run by [@&#8203;giri-vsr](https://github.com/giri-vsr) in https://github.com/go-co-op/gocron/pull/715
-   fix mocks import path by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/720

#### New Contributors

-   [@&#8203;evgenymarkov](https://github.com/evgenymarkov) made their first contribution in 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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/705
-   Added Distributed Locker to JobOptions by [@&#8203;giri-vsr](https://github.com/giri-vsr) in https://github.com/go-co-op/gocron/pull/711

#### New Contributors

-   [@&#8203;giri-vsr](https://github.com/giri-vsr) made their first contribution in 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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in 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 [@&#8203;moyu-x](https://github.com/moyu-x) in https://github.com/go-co-op/gocron/pull/701
-   properly report lastRun for limit type jobs and RunNow by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/700

#### New Contributors

-   [@&#8203;moyu-x](https://github.com/moyu-x) made their first contribution in 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 [@&#8203;drewgonzales360](https://github.com/drewgonzales360) in https://github.com/go-co-op/gocron/pull/699
-   fix case where job removed causes panic when rescheduling by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/698

#### New Contributors

-   [@&#8203;drewgonzales360](https://github.com/drewgonzales360) made their first contribution in 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 [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/go-co-op/gocron/pull/684
-   elector & locker were failing to send out when not leader by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in 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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/672
-   Bump golangci/golangci-lint-action from 3.7.0 to 4.0.0 by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/go-co-op/gocron/pull/675
-   fix cases where default on send out is resulting in job not going out by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in 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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in 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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in 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 [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/go-co-op/gocron/pull/664
-   fix unsafe map usage in singletonMode by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) & [@&#8203;a3sroot](https://github.com/a3sroot) in 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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in 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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/658
-   BETA FEATURE: Add job monitor interface to allow for collecting job metrics by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in 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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/650
-   make the order of the returned jobs slice deterministic by [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/652

#### Documentation

-   refactor: fix indent by [@&#8203;leedrum](https://github.com/leedrum) in https://github.com/go-co-op/gocron/pull/649

#### New Contributors

-   [@&#8203;leedrum](https://github.com/leedrum) made their first contribution in 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](7ee4c50f57)
-   [fixup Job and Scheduler interface docs](a51820e30f)

**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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/646

#### Version bumps

-   Bump github/codeql-action from 2 to 3 by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/go-co-op/gocron/pull/644
-   Bump github.com/google/uuid from 1.4.0 to 1.5.0 by [@&#8203;dependabot](https://github.com/dependabot) in 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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/643 [#&#8203;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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/638 raised in [#&#8203;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 [@&#8203;JohnRoesler](https://github.com/JohnRoesler) in https://github.com/go-co-op/gocron/pull/635

#### Bumps

-   Bump actions/checkout from 3 to 4 by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/go-co-op/gocron/pull/631
-   Bump actions/setup-go from 4 to 5 by [@&#8203;dependabot](https://github.com/dependabot) in 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

-   [@&#8203;AlphaNecron](https://github.com/AlphaNecron) made their first contribution in 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**: 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 [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNDAuMSIsInVwZGF0ZWRJblZlciI6IjM5LjI0MC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: t.behrendt <t.behrendt@noreply.localhost>
Reviewed-on: https://gitea.t000-n.de/t.behrendt/realDynDNS/pulls/35
Co-authored-by: Renovate Bot <renovate@t00n.de>
Co-committed-by: Renovate Bot <renovate@t00n.de>
2025-04-13 18:49:09 +02:00
d4e48c2fbf chore(deps): update docker/build-push-action action to v6 (#32)
All checks were successful
CD / Check changes (push) Successful in 7s
CD / test (push) Successful in 2m49s
CD / Build and push (arm64) (push) Has been skipped
CD / Build and push (amd64) (push) Has been skipped
CD / Create manifest (push) Has been skipped
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [docker/build-push-action](https://github.com/docker/build-push-action) | action | major | `v4` -> `v6` |

---

### Release Notes

<details>
<summary>docker/build-push-action (docker/build-push-action)</summary>

### [`v6`](https://github.com/docker/build-push-action/compare/v5...v6)

[Compare Source](https://github.com/docker/build-push-action/compare/v5...v6)

### [`v5`](https://github.com/docker/build-push-action/compare/v4...v5)

[Compare Source](https://github.com/docker/build-push-action/compare/v4...v5)

</details>

---

### Configuration

📅 **Schedule**: 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 [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNDAuMSIsInVwZGF0ZWRJblZlciI6IjM5LjI0MC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: #32
Co-authored-by: Renovate Bot <renovate@t00n.de>
Co-committed-by: Renovate Bot <renovate@t00n.de>
2025-04-13 18:46:07 +02:00
a34f1f0a9a chore(deps): update docker/setup-buildx-action action to v3 (#34)
All checks were successful
CD / Check changes (push) Successful in 7s
CD / test (push) Successful in 22s
CD / Build and push (amd64) (push) Has been skipped
CD / Build and push (arm64) (push) Has been skipped
CD / Create manifest (push) Has been skipped
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | action | major | `v2` -> `v3` |

---

### Release Notes

<details>
<summary>docker/setup-buildx-action (docker/setup-buildx-action)</summary>

### [`v3`](https://github.com/docker/setup-buildx-action/compare/v2...v3)

[Compare Source](https://github.com/docker/setup-buildx-action/compare/v2...v3)

</details>

---

### Configuration

📅 **Schedule**: 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 [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNDAuMSIsInVwZGF0ZWRJblZlciI6IjM5LjI0MC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: #34
Co-authored-by: Renovate Bot <renovate@t00n.de>
Co-committed-by: Renovate Bot <renovate@t00n.de>
2025-04-13 18:44:33 +02:00
ab150a88ef chore(deps): update docker/login-action action to v3 (#33)
Some checks failed
CD / Check changes (push) Successful in 7s
CD / test (push) Successful in 21s
CD / Build and push (amd64) (push) Has been skipped
CD / Build and push (arm64) (push) Has been cancelled
CD / Create manifest (push) Has been cancelled
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [docker/login-action](https://github.com/docker/login-action) | action | major | `v2` -> `v3` |

---

### Release Notes

<details>
<summary>docker/login-action (docker/login-action)</summary>

### [`v3`](https://github.com/docker/login-action/compare/v2...v3)

[Compare Source](https://github.com/docker/login-action/compare/v2...v3)

</details>

---

### Configuration

📅 **Schedule**: 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 [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNDAuMSIsInVwZGF0ZWRJblZlciI6IjM5LjI0MC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: #33
Co-authored-by: Renovate Bot <renovate@t00n.de>
Co-committed-by: Renovate Bot <renovate@t00n.de>
2025-04-13 18:43:53 +02:00
f1e863b098 chore: Configure Renovate (#30)
All checks were successful
CD / Check changes (push) Successful in 30s
CD / test (push) Successful in 48s
CD / Build and push (amd64) (push) Has been skipped
CD / Build and push (arm64) (push) Has been skipped
CD / Create manifest (push) Has been skipped
Welcome to [Renovate](https://github.com/renovatebot/renovate)! This is an onboarding PR to help you understand and configure settings before regular Pull Requests begin.

🚦 To activate Renovate, merge this Pull Request. To disable Renovate, simply close this Pull Request unmerged.

---
### Detected Package Files

 * `Dockerfile` (dockerfile)
 * `.gitea/workflows/cd.yaml` (github-actions)
 * `.gitea/workflows/ci.yaml` (github-actions)
 * `go.mod` (gomod)

### What to Expect

With your current configuration, Renovate will create 5 Pull Requests:

<details>
<summary>chore(deps): update golang docker tag to v1.24</summary>

  - Schedule: ["at any time"]
  - Branch name: `renovate/golang-1.x`
  - Merge into: `main`
  - Upgrade golang to `1.24-alpine`

</details>

<details>
<summary>chore(deps): update docker/build-push-action action to v6</summary>

  - Schedule: ["at any time"]
  - Branch name: `renovate/docker-build-push-action-6.x`
  - Merge into: `main`
  - Upgrade [docker/build-push-action](https://github.com/docker/build-push-action) to `v6`

</details>

<details>
<summary>chore(deps): update docker/login-action action to v3</summary>

  - Schedule: ["at any time"]
  - Branch name: `renovate/docker-login-action-3.x`
  - Merge into: `main`
  - Upgrade [docker/login-action](https://github.com/docker/login-action) to `v3`

</details>

<details>
<summary>chore(deps): update docker/setup-buildx-action action to v3</summary>

  - Schedule: ["at any time"]
  - Branch name: `renovate/docker-setup-buildx-action-3.x`
  - Merge into: `main`
  - Upgrade [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) to `v3`

</details>

<details>
<summary>chore(deps): update module github.com/go-co-op/gocron to v2</summary>

  - Schedule: ["at any time"]
  - Branch name: `renovate/github.com-go-co-op-gocron-2.x`
  - Merge into: `main`
  - Upgrade [github.com/go-co-op/gocron](https://github.com/go-co-op/gocron) to `v2.16.1`

</details>

---

 Got questions? Check out Renovate's [Docs](https://docs.renovatebot.com/), particularly the Getting Started section.
If you need any further assistance then you can also [request help here](https://github.com/renovatebot/renovate/discussions).

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).

<!--renovate-config-hash:94693a990c975907e7f13da3309b9d56ba02b3983519b41786edf5cf031e457c-->

Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Reviewed-on: #30
Co-authored-by: Renovate Bot <renovate@t00n.de>
Co-committed-by: Renovate Bot <renovate@t00n.de>
2025-04-13 18:38:14 +02:00
ad20ad46b0 chore: slimmer docker base image & binary (#29)
All checks were successful
CD / test (push) Successful in 2m26s
CD / Build and push (amd64) (push) Successful in 1m37s
CD / Build and push (arm64) (push) Successful in 3m54s
CD / Create manifest (push) Successful in 11s
Reduction of 352 MiB -> 8.22 MiB

Reviewed-on: #29
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
2025-02-16 20:27:29 +01:00
ccf4f5dbbb ci: refactor CD to only publish a single OCI manifest for all arches (#28)
All checks were successful
CD / test (push) Successful in 2m21s
CD / Build and push (amd64) (push) Successful in 53s
CD / Build and push (arm64) (push) Successful in 2m11s
CD / Create manifest (push) Successful in 11s
Reviewed-on: #28
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
2025-01-18 22:28:30 +01:00
e53827adf0 ci: refactor multi arch build (#27)
All checks were successful
CD / test (push) Successful in 1m34s
CD / Build and push (amd64) (push) Successful in 57s
CD / Build and push (arm64) (push) Successful in 2m19s
Reviewed-on: #27
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
2025-01-07 19:08:58 +01:00
ad0932f4aa docs: log level (#23)
All checks were successful
CD / test (push) Successful in 29s
CD / Build and push (push) Successful in 4m16s
Reviewed-on: #23
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
2025-01-01 12:25:14 +01:00
fff36bf807 feat: concurrently check and update all domains (#24)
All checks were successful
CD / test (push) Successful in 2m32s
CD / Build and push (push) Successful in 2m53s
Reviewed-on: #24
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
2024-12-30 17:37:49 +01:00
1c725993f5 fix: increase resilliency (#22)
All checks were successful
CD / test (push) Successful in 47s
CD / Build and push (push) Successful in 3m2s
Reviewed-on: #22
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
2024-12-27 20:44:19 +01:00
3ad5b1ec0e feat: logging (#20)
All checks were successful
CD / test (push) Successful in 52s
CD / Build and push (push) Successful in 15m10s
Reviewed-on: #20
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
2024-12-27 19:52:21 +01:00
1ea43ac4cf chore: upgrade from go 1.20 to 1.23 (#21)
All checks were successful
CD / test (push) Successful in 48s
CD / Build and push (push) Successful in 3m1s
Reviewed-on: #21
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
2024-12-27 17:09:34 +01:00
b781399b47 fix: only query relevant records when looking up record ids on Ionos API (#19)
All checks were successful
CD / test (push) Successful in 5m33s
CD / Build and push (push) Successful in 4m7s
Reviewed-on: #19
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
2024-12-27 16:55:26 +01:00
40a41ce7ca fix: align go version of modfile with dockerfile (#18)
All checks were successful
CD / test (push) Successful in 48s
CD / Build and push (push) Successful in 2m47s
Reviewed-on: #18
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
2024-12-27 12:32:51 +01:00
ef57421268 ci: check format in CI pipeline (#17)
All checks were successful
CD / test (push) Successful in 20s
CD / Build and push (push) Successful in 2m41s
Reviewed-on: #17
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
2024-12-23 19:37:47 +01:00
a01c328ac5 docs: mode feature (#16)
All checks were successful
CD / test (push) Successful in 20s
CD / Build and push (push) Successful in 3m44s
Reviewed-on: #16
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
2024-12-23 14:59:51 +01:00
ac786f533d feat: add mode selecting (#15)
All checks were successful
CD / test (push) Successful in 44s
CD / Build and push (push) Successful in 3m5s
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
2024-12-23 14:17:46 +01:00
17 changed files with 361 additions and 106 deletions

View File

@@ -4,6 +4,14 @@ on:
push: push:
branches: branches:
- main - main
paths:
- "go.mod"
- "go.sum"
- "**/*.go"
- "config.example.yaml"
- "Dockerfile"
- "Makefile"
workflow_dispatch:
env: env:
DOCKER_REGISTRY: gitea.t000-n.de DOCKER_REGISTRY: gitea.t000-n.de
@@ -14,9 +22,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- name: Setup go - name: Setup go
uses: actions/setup-go@v5 uses: actions/setup-go@v6
with: with:
go-version-file: go.mod go-version-file: go.mod
check-latest: true check-latest: true
@@ -44,25 +52,72 @@ jobs:
build_and_push: build_and_push:
name: Build and push name: Build and push
strategy:
matrix:
arch: [amd64, arm64]
needs: needs:
- test - test
runs-on: ubuntu-latest runs-on:
- ubuntu-latest
- linux_${{ matrix.arch }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v3
- name: Login to Registry - name: Login to Registry
uses: docker/login-action@v2 uses: docker/login-action@v3
with: with:
registry: ${{ env.DOCKER_REGISTRY }} registry: ${{ env.DOCKER_REGISTRY }}
username: ${{ secrets.REGISTRY_USER }} username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }} password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Get Metadata
id: meta
run: |
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}' | tr '[:upper:]' '[:lower:]') >> $GITHUB_OUTPUT
echo REPO_VERSION=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
platforms: linux/${{ matrix.arch }}
push: true
provenance: false
build-args: GOARCH=${{ matrix.arch }}
tags: |
${{ env.DOCKER_REGISTRY }}/t.behrendt/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}-${{ matrix.arch }}
create_tag:
name: Create tag
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.tag.outputs.new-tag }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with:
fetch-depth: 0
- uses: https://gitea.t000-n.de/t.behrendt/conventional-semantic-git-tag-increment@0.1.20
id: tag
with:
token: ${{ secrets.GITEA_TOKEN }}
prerelease: ${{ github.event_name == 'workflow_dispatch' }}
- run: |
git tag ${{ steps.tag.outputs.new-tag }}
git push origin ${{ steps.tag.outputs.new-tag }}
- name: Set output
run: |
echo "tag=${{ steps.tag.outputs.new-tag }}" >> $GITHUB_OUTPUT
create_manifest:
name: Create manifest
needs:
- build_and_push
- create_tag
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Get Metadata - name: Get Metadata
id: meta id: meta
@@ -70,15 +125,17 @@ jobs:
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}' | tr '[:upper:]' '[:lower:]') >> $GITHUB_OUTPUT echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}' | tr '[:upper:]' '[:lower:]') >> $GITHUB_OUTPUT
echo REPO_VERSION=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT echo REPO_VERSION=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT
- name: Build and push - name: Login to Registry
uses: docker/build-push-action@v4 uses: docker/login-action@v3
with: with:
context: . registry: ${{ env.DOCKER_REGISTRY }}
file: ./Dockerfile username: ${{ secrets.REGISTRY_USER }}
platforms: | password: ${{ secrets.REGISTRY_PASSWORD }}
linux/amd64
linux/arm64 - name: Create manifest
push: true run: |
tags: | docker manifest create ${{ env.DOCKER_REGISTRY }}/t.behrendt/${{ steps.meta.outputs.REPO_NAME }}:${{ needs.create_tag.outputs.tag }} \
${{ env.DOCKER_REGISTRY }}/t.behrendt/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }} ${{ env.DOCKER_REGISTRY }}/t.behrendt/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}-amd64 \
${{ env.DOCKER_REGISTRY }}/t.behrendt/${{ steps.meta.outputs.REPO_NAME }}:latest ${{ env.DOCKER_REGISTRY }}/t.behrendt/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}-arm64
docker manifest push ${{ env.DOCKER_REGISTRY }}/t.behrendt/${{ steps.meta.outputs.REPO_NAME }}:${{ needs.create_tag.outputs.tag }}

View File

@@ -13,9 +13,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- name: Setup go - name: Setup go
uses: actions/setup-go@v5 uses: actions/setup-go@v6
with: with:
go-version-file: go.mod go-version-file: go.mod
check-latest: true check-latest: true
@@ -35,8 +35,10 @@ jobs:
/go_cache /go_cache
key: go_path-${{ steps.hash-go.outputs.hash }} key: go_path-${{ steps.hash-go.outputs.hash }}
restore-keys: |- restore-keys: |-
go_cache-${{ steps.hash-go.outputs.hash }} go_cache-${{ steps.hash-go.outputs.hash }}
- name: build - name: build
run: make build run: make build
- name: test - name: test
run: make test run: make test
- name: check:format
run: make check-format

View File

@@ -1,21 +1,14 @@
FROM golang:1.21-alpine FROM golang:1.25-alpine as build
ARG GOARCH=amd64
# Set the Current Working Directory inside the container
WORKDIR /app WORKDIR /app
# Copy go mod and sum files
COPY go.mod go.sum ./ COPY go.mod go.sum ./
# Download all dependencies. Dependencies will be cached if the go.mod and go.sum files are not changed
RUN go mod download RUN go mod download
# Copy the source from the current directory to the Working Directory inside the container
COPY . . COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${GOARCH} \
go build -trimpath -ldflags="-s -w" -o main .
# Build the Go app FROM gcr.io/distroless/static-debian12
RUN go build -o main . COPY --from=build /app/main /
CMD ["/main"]
# Command to run the executable
CMD ["./main"]

View File

@@ -6,3 +6,18 @@ build:
lint: lint:
golint ./... golint ./...
run:
make build
./realdyndns
format:
gofmt -w .
check-format:
@OUTPUT=$$(gofmt -l .); \
if [ -n "$$OUTPUT" ]; then \
echo "Formatter failed for:"; \
echo "$$OUTPUT"; \
exit 1; \
fi

View File

@@ -1,10 +1,12 @@
# realDynDNS # realDynDNS
RealDynDNS aims to be a replacement to "classical" dynDNS solutions that offer a subdomain. Instead realDynDns actually changes your DNS entries. RealDynDNS aims to be a replacement to "classical" dynDNS solutions that offer a subdomain. Instead realDynDns actually changes your DNS entries.
This service requires your DNS provider to expose an API that allows your DNS entries to be changed. This service requires your DNS provider to expose an API that allows your DNS entries to be changed.
A service that provides your current external IP is also required. A service that provides your current external IP is also required.
## Configuration ## Configuration
The configuration is done via a YAML file called `config.yaml`. The following example shows the configuration for a domain with two subdomains. The configuration is done via a YAML file called `config.yaml`. The following example shows the configuration for a domain with two subdomains.
Configuration of the IP provider and the DNS provider is mandatory. Configuration of the IP provider and the DNS provider is mandatory.
@@ -35,40 +37,52 @@ domains:
- "@" - "@"
- www - www
check_interval: 0 0 0/6 * * * * check_interval: 0 0 0/6 * * * *
mode: Scheduled
log_level: info
``` ```
The config file is expected to be in the same directory as the binary and called `config.yaml`. For the OCR image, the root directory is `/app`. The config file is expected to be in the same directory as the binary and called `config.yaml`. For the OCR image, the root directory is `/app`.
## DNS Providers ## DNS Providers
The DNS provider abstracts the API of your DNS provider. Currently the following providers are supported: The DNS provider abstracts the API of your DNS provider. Currently the following providers are supported:
### IONOS ### IONOS
IONOS requires two configuration parameters. You can get your API key [here](https://developer.hosting.ionos.com/docs/getstarted). IONOS requires two configuration parameters. You can get your API key [here](https://developer.hosting.ionos.com/docs/getstarted).
```yaml ```yaml
api_key: <your-api-key> api_key: <your-api-key>
base_url: https://api.hosting.ionos.com/dns base_url: https://api.hosting.ionos.com/dns
``` ```
## External IP Providers ## External IP Providers
The external IP provider is used to get your current external IP. Currently the following providers are supported: The external IP provider is used to get your current external IP. Currently the following providers are supported:
### Plain ### Plain
Any provider that returns your IP as plain text can be used. The following configuration is required: Any provider that returns your IP as plain text can be used. The following configuration is required:
```yaml ```yaml
url: <your-providers-URL> url: <your-providers-URL>
``` ```
Examples for providers are: Examples for providers are:
- https://ifconfig.me - https://ifconfig.me
- https://api.ipify.org - https://api.ipify.org
## Notification Providers ## Notification Providers
The notification provider is used to send notifications whena IP address changes and a DNS record is updated. The notification provider is used to send notifications whena IP address changes and a DNS record is updated.
### Console ### Console
The console notification provider is used to print the notification to the console. This is the default notification provider. The console notification provider is used to print the notification to the console. This is the default notification provider.
### Gotify ### Gotify
The Gotify notification provider is used to send notifications to a Gotify server. The Gotify notification provider is used to send notifications to a Gotify server.
```yaml ```yaml
@@ -77,4 +91,20 @@ token: <your-token>
priority: 0 priority: 0
``` ```
The priority must be between 0 and 4. The priority must be between 0 and 4.
## Mode Selection
Two modes are available:
### RunOnce
The RunOnce mode is used to run the application once and exit. This is useful when providing your own external scheduler, like cron.
Set the `mode` to `RunOnce`.
### Scheduled
The Scheduled mode is used to run the application in a scheduled interval.
Set the `mode` to `Scheduled` and provide a cron expression for the `check_interval`.

View File

@@ -21,3 +21,4 @@ domains:
- www - www
check_interval: 0 0 0/6 * * * * check_interval: 0 0 0/6 * * * *
mode: Scheduled mode: Scheduled
log_level: info

5
go.mod
View File

@@ -1,15 +1,16 @@
module realdnydns module realdnydns
go 1.20 go 1.25.0
require ( require (
github.com/go-co-op/gocron v1.37.0 github.com/go-co-op/gocron v1.37.0
github.com/go-co-op/gocron/v2 v2.18.0
gopkg.in/yaml.v3 v3.0.1 gopkg.in/yaml.v3 v3.0.1
) )
require ( require (
github.com/google/uuid v1.6.0 // indirect github.com/google/uuid v1.6.0 // indirect
github.com/robfig/cron/v3 v3.0.1 // indirect github.com/robfig/cron/v3 v3.0.1 // indirect
github.com/stretchr/testify v1.8.4 // indirect github.com/stretchr/testify v1.11.1 // indirect
go.uber.org/atomic v1.11.0 // indirect go.uber.org/atomic v1.11.0 // indirect
) )

6
go.sum
View File

@@ -4,6 +4,7 @@ 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 v1.37.0 h1:ZYDJGtQ4OMhTLKOKMIch+/CY70Brbb1dGdooLEhh7b0=
github.com/go-co-op/gocron v1.37.0/go.mod h1:3L/n6BkO7ABj+TrfSVXLRzsP26zmikL4ISkLQ0O8iNY= github.com/go-co-op/gocron v1.37.0/go.mod h1:3L/n6BkO7ABj+TrfSVXLRzsP26zmikL4ISkLQ0O8iNY=
github.com/go-co-op/gocron/v2 v2.18.0/go.mod h1:Zii6he+Zfgy5W9B+JKk/KwejFOW0kZTFvHtwIpR4aBI=
github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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=
@@ -30,8 +31,9 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV
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.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
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/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=

79
main.go
View File

@@ -2,6 +2,9 @@ package main
import ( import (
"fmt" "fmt"
"log/slog"
"os"
"strings"
"realdnydns/pkg/config" "realdnydns/pkg/config"
"realdnydns/pkg/dnsProvider" "realdnydns/pkg/dnsProvider"
@@ -15,48 +18,84 @@ import (
) )
func main() { func main() {
logger := slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{
Level: slog.LevelInfo,
}))
configClient := config.Config{} configClient := config.Config{}
err := configClient.Load("config.yaml") err := configClient.Load("config.yaml")
if err != nil { if err != nil {
logger.Error("Failed to load config file", slog.String("error", err.Error()))
panic(err) panic(err)
} }
if configClient.LogLevel != "" {
logger = slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{
Level: slog.Level(config.LogLevelMap[strings.ToLower(configClient.LogLevel)]),
}))
}
var externalIpProvider externalIpProvider.ExternalIpProvider var externalIpProvider externalIpProvider.ExternalIpProvider
switch configClient.ExternalIPProvider.Type { switch configClient.ExternalIPProvider.Type {
case "plain": case "plain":
logger.Info("Using plain external IP provider", slog.String("external_ip_provider", "plain"))
var plainConfig plainExternalIpProvider.PlainExternalIpProviderConfig var plainConfig plainExternalIpProvider.PlainExternalIpProviderConfig
err := configClient.ExternalIPProvider.ProviderConfig.Decode(&plainConfig) err := configClient.ExternalIPProvider.ProviderConfig.Decode(&plainConfig)
if err != nil { if err != nil {
logger.Error("Failed to create config",
slog.String("external_ip_provider", "plain"),
slog.String("error", err.Error()),
)
panic(err) panic(err)
} }
externalIpProvider, err = plainExternalIpProvider.New(plainConfig) externalIpProvider, err = plainExternalIpProvider.New(plainConfig)
if err != nil { if err != nil {
logger.Error("Failed to create plain external IP provider",
slog.String("external_ip_provider", "plain"),
slog.String("error", err.Error()),
)
panic(err) panic(err)
} }
default: default:
logger.Error("Unknown external IP provider", slog.String("external_ip_provider", configClient.ExternalIPProvider.Type))
panic(fmt.Errorf("unknown external IP provider: %s", configClient.ExternalIPProvider.Type)) panic(fmt.Errorf("unknown external IP provider: %s", configClient.ExternalIPProvider.Type))
} }
var dnsProvider dnsProvider.DNSProvider var dnsProvider dnsProvider.DNSProvider
switch configClient.DNSProvider.Type { switch configClient.DNSProvider.Type {
case "ionos": case "ionos":
logger.Info("Using IONOS DNS provider", slog.String("dns_provider", "ionos"))
var ionosConfig ionos.IONOSConfig var ionosConfig ionos.IONOSConfig
err := configClient.DNSProvider.ProviderConfig.Decode(&ionosConfig) err := configClient.DNSProvider.ProviderConfig.Decode(&ionosConfig)
if err != nil { if err != nil {
logger.Error("Failed to create IONOS DNS provider",
slog.String("dns_provider", "ionos"),
slog.String("error", err.Error()),
)
panic(err) panic(err)
} }
dnsProvider, err = ionos.NewIonos(&ionosConfig) dnsProvider, err = ionos.NewIonos(&ionosConfig)
if err != nil { if err != nil {
logger.Error("Failed to create IONOS DNS provider",
slog.String("dns_provider", "ionos"),
slog.String("error", err.Error()),
)
panic(err) panic(err)
} }
default: default:
logger.Error("Unknown DNS provider", slog.String("dns_provider", configClient.DNSProvider.Type))
panic(fmt.Errorf("unknown DNS provider: %s", configClient.DNSProvider.Type)) panic(fmt.Errorf("unknown DNS provider: %s", configClient.DNSProvider.Type))
} }
var notificationProvider notificationProvider.NotificationProvider var notificationProvider notificationProvider.NotificationProvider
switch configClient.NotificationProvider.Type { switch configClient.NotificationProvider.Type {
case "gotify": case "gotify":
logger.Info("Using Gotify notification provider", slog.String("notification_provider", "gotify"))
var gotifyConfig gotify.NotificationProviderImplGotifyConfig var gotifyConfig gotify.NotificationProviderImplGotifyConfig
err := configClient.NotificationProvider.ProviderConfig.Decode(&gotifyConfig) err := configClient.NotificationProvider.ProviderConfig.Decode(&gotifyConfig)
if err != nil { if err != nil {
@@ -65,29 +104,39 @@ func main() {
notificationProvider, err = gotify.New(gotifyConfig) notificationProvider, err = gotify.New(gotifyConfig)
if err != nil { if err != nil {
logger.Error("Failed to create Gotify notification provider",
slog.String("notification_provider", "gotify"),
slog.String("error", err.Error()),
)
panic(err) panic(err)
} }
default: default:
logger.Info("Using console notification provider", slog.String("notification_provider", "console"))
notificationProvider = notificationProviderConsole.New() notificationProvider = notificationProviderConsole.New()
} }
rdd := realDynDns.New(externalIpProvider, dnsProvider, notificationProvider, configClient.Domains) rdd := realDynDns.New(externalIpProvider, dnsProvider, notificationProvider, configClient.Domains, logger.With(slog.String("service", "realDynDns")))
switch configClient.Mode { switch configClient.Mode {
case config.ScheduledMode: case config.ScheduledMode:
schedule, job, err := rdd.RunWithSchedule(configClient.CheckInterval) logger.Info("Running in scheduled mode", slog.String("interval", configClient.CheckInterval))
if err != nil {
panic(err)
}
fmt.Println("Starting scheduler") schedule, job, err := rdd.RunWithSchedule(configClient.CheckInterval)
fmt.Println("Next run:", job.NextRun()) if err != nil {
schedule.StartBlocking() logger.Error("Failed to create scheduler", slog.String("error", err.Error()))
case config.RunOnceMode: panic(err)
numberOfChanges, err := rdd.RunOnce() }
if err != nil {
panic(err) logger.Info("Next run:", slog.String("time", job.NextRun().String()))
} schedule.StartBlocking()
fmt.Println("Number of changes:", numberOfChanges) case config.RunOnceMode:
logger.Info("Running in run once mode")
_, err := rdd.RunOnce()
if err != nil {
logger.Error("Failed to run once", slog.String("error", err.Error()))
panic(err)
}
} }
} }

View File

@@ -3,7 +3,9 @@ package config
import ( import (
"errors" "errors"
"fmt" "fmt"
"log/slog"
"os" "os"
"strings"
"gopkg.in/yaml.v3" "gopkg.in/yaml.v3"
) )
@@ -15,13 +17,26 @@ type Config struct {
NotificationProvider NotificationProviderConfig `yaml:"notification_provider,omitempty"` NotificationProvider NotificationProviderConfig `yaml:"notification_provider,omitempty"`
Domains []DomainConfig `yaml:"domains"` Domains []DomainConfig `yaml:"domains"`
CheckInterval string `yaml:"check_interval"` CheckInterval string `yaml:"check_interval"`
LogLevel string `yaml:"log_level"`
} }
const ( const (
RunOnceMode = "RunOnce" RunOnceMode = "RunOnce"
ScheduledMode = "Scheduled" ScheduledMode = "Scheduled"
) )
var LogLevelMap = map[string]slog.Level{
"debug": slog.LevelDebug,
"info": slog.LevelInfo,
"warn": slog.LevelWarn,
"error": slog.LevelError,
}
func isValidLogLevel(level string) bool {
_, ok := LogLevelMap[strings.ToLower(level)]
return ok
}
type DomainConfig struct { type DomainConfig struct {
TLD string `yaml:"tld"` TLD string `yaml:"tld"`
Subdomains []string `yaml:"subdomains"` Subdomains []string `yaml:"subdomains"`
@@ -56,7 +71,7 @@ func (c *Config) Load(filePath string) error {
return fmt.Errorf("failed to validate config: %w", err) return fmt.Errorf("failed to validate config: %w", err)
} }
return nil; return nil
} }
func (c *Config) validate() error { func (c *Config) validate() error {
@@ -68,5 +83,9 @@ func (c *Config) validate() error {
return errors.New("check interval must be set when mode is 'Scheduled'") return errors.New("check interval must be set when mode is 'Scheduled'")
} }
return nil; if c.LogLevel != "" && !isValidLogLevel(c.LogLevel) {
} return fmt.Errorf("log level must be one of 'debug', 'info', 'warn', 'error', but got %s", c.LogLevel)
}
return nil
}

View File

@@ -7,6 +7,7 @@ import (
"io" "io"
"net" "net"
"net/http" "net/http"
"net/url"
"realdnydns/model/common" "realdnydns/model/common"
) )
@@ -18,7 +19,7 @@ type IonosAPI interface {
SetARecord(tld string, subdomain string, ip net.IP, ttl int, prio int, disabled bool) (*common.ARecord, error) SetARecord(tld string, subdomain string, ip net.IP, ttl int, prio int, disabled bool) (*common.ARecord, error)
GetZoneId(tld string) (string, error) GetZoneId(tld string) (string, error)
GetRecordId(zoneId string, tld string, subdomain string, recordType string) (string, error) GetRecordId(zoneId string, tld string, subdomain string, recordType string) (string, error)
HttpCall(method string, url string, body io.Reader) (*http.Response, error) HttpCall(method string, url string, body io.Reader, queryParams map[string]string) (*http.Response, error)
} }
type IonosAPIImpl struct { type IonosAPIImpl struct {
@@ -76,8 +77,16 @@ func New(APIKey string, BaseURL string) IonosAPI {
} }
} }
func (i *IonosAPIImpl) HttpCall(method string, url string, body io.Reader) (*http.Response, error) { func (i *IonosAPIImpl) HttpCall(method string, path string, body io.Reader, queryParams map[string]string) (*http.Response, error) {
req, err := http.NewRequest(method, i.BaseURL+url, body) requestUrl, _ := url.Parse(i.BaseURL + path)
query := requestUrl.Query()
for key, value := range queryParams {
query.Add(key, value)
}
requestUrl.RawQuery = query.Encode()
req, err := http.NewRequest(method, requestUrl.String(), body)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -90,7 +99,7 @@ func (i *IonosAPIImpl) HttpCall(method string, url string, body io.Reader) (*htt
} }
func (i *IonosAPIImpl) GetZoneId(tld string) (string, error) { func (i *IonosAPIImpl) GetZoneId(tld string) (string, error) {
res, err := i.HttpCall("GET", "/v1/zones", nil) res, err := i.HttpCall("GET", "/v1/zones", nil, nil)
if err != nil { if err != nil {
return "", err return "", err
} }
@@ -111,7 +120,14 @@ func (i *IonosAPIImpl) GetZoneId(tld string) (string, error) {
} }
func (i *IonosAPIImpl) GetRecordId(zoneId string, tld string, subdomain string, recordType string) (string, error) { func (i *IonosAPIImpl) GetRecordId(zoneId string, tld string, subdomain string, recordType string) (string, error) {
res, err := i.HttpCall("GET", "/v1/zones/"+zoneId, nil) var domain string
if subdomain == "@" || subdomain == "" {
domain = tld
} else {
domain = subdomain + "." + tld
}
res, err := i.HttpCall("GET", "/v1/zones/"+zoneId, nil, map[string]string{"recordName": domain, "recordType": recordType})
if err != nil { if err != nil {
return "", err return "", err
} }
@@ -122,13 +138,6 @@ func (i *IonosAPIImpl) GetRecordId(zoneId string, tld string, subdomain string,
zone := ZoneResponse{} zone := ZoneResponse{}
json.Unmarshal(responseBody, &zone) json.Unmarshal(responseBody, &zone)
var domain string
if subdomain == "@" || subdomain == "" {
domain = tld
} else {
domain = subdomain + "." + tld
}
for _, record := range zone.Records { for _, record := range zone.Records {
if record.Type == recordType && record.Name == domain { if record.Type == recordType && record.Name == domain {
return record.Id, nil return record.Id, nil
@@ -159,7 +168,7 @@ func (i *IonosAPIImpl) SetARecord(tld string, subdomain string, ip net.IP, ttl i
return nil, err return nil, err
} }
res, err := i.HttpCall("PUT", "/v1/zones/"+zoneId+"/records/"+recordId, bytes.NewReader(changeRecordRequest)) res, err := i.HttpCall("PUT", "/v1/zones/"+zoneId+"/records/"+recordId, bytes.NewReader(changeRecordRequest), nil)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -171,8 +180,6 @@ func (i *IonosAPIImpl) SetARecord(tld string, subdomain string, ip net.IP, ttl i
return nil, errors.New("error updating record") return nil, errors.New("error updating record")
} }
changeRecord := ChangeRecord{} changeRecord := ChangeRecord{}
json.Unmarshal(responseBody, &changeRecord) json.Unmarshal(responseBody, &changeRecord)
@@ -196,7 +203,7 @@ func (ionos *IonosAPIImpl) GetARecord(tld string, subdomain string) (*common.ARe
return nil, err return nil, err
} }
res, err := ionos.HttpCall("GET", "/v1/zones/"+zoneId+"/records/"+recordId, nil) res, err := ionos.HttpCall("GET", "/v1/zones/"+zoneId+"/records/"+recordId, nil, nil)
if err != nil { if err != nil {
return nil, err return nil, err
} }

View File

@@ -76,7 +76,8 @@ func utilMockServerImpl() func(w http.ResponseWriter, r *http.Request) {
if r.Method == "GET" { if r.Method == "GET" {
if r.RequestURI == "/v1/zones" { if r.RequestURI == "/v1/zones" {
response = zonesResponseJson response = zonesResponseJson
} else if r.RequestURI == "/v1/zones/1234567890" { } else if r.RequestURI == "/v1/zones/1234567890?recordName=example.com&recordType=A" ||
r.RequestURI == "/v1/zones/1234567890?recordName=sub.example.com&recordType=A" {
response = zoneResponseJson response = zoneResponseJson
} else if r.RequestURI == "/v1/zones/1234567890/records/abcdefghij" { } else if r.RequestURI == "/v1/zones/1234567890/records/abcdefghij" {
response = recordResponseSubJson response = recordResponseSubJson
@@ -106,7 +107,7 @@ func TestHttpCall(t *testing.T) {
func testHttpCallGet(api IonosAPI) func(t *testing.T) { func testHttpCallGet(api IonosAPI) func(t *testing.T) {
return func(t *testing.T) { return func(t *testing.T) {
res, err := api.HttpCall("GET", "/v1/zones", nil) res, err := api.HttpCall("GET", "/v1/zones", nil, nil)
if err != nil { if err != nil {
t.Fatalf("HttpCall() returned unexpected error: %v", err) t.Fatalf("HttpCall() returned unexpected error: %v", err)
@@ -120,7 +121,7 @@ func testHttpCallGet(api IonosAPI) func(t *testing.T) {
func testHttpCallPut(api IonosAPI) func(t *testing.T) { func testHttpCallPut(api IonosAPI) func(t *testing.T) {
return func(t *testing.T) { return func(t *testing.T) {
res, err := api.HttpCall("PUT", "/v1/zones/1234567890/records/abcdefghij", nil) res, err := api.HttpCall("PUT", "/v1/zones/1234567890/records/abcdefghij", nil, nil)
if err != nil { if err != nil {
t.Fatalf("HttpCall() returned unexpected error: %v", err) t.Fatalf("HttpCall() returned unexpected error: %v", err)
@@ -141,7 +142,7 @@ func testHttpCallNonExistingEndpoint() func(t *testing.T) {
api := New("dummyKey", mockServer.URL) api := New("dummyKey", mockServer.URL)
res, err := api.HttpCall("GET", "/v1/nonExistingEndpoint", nil) res, err := api.HttpCall("GET", "/v1/nonExistingEndpoint", nil, nil)
if err != nil { if err != nil {
t.Fatalf("HttpCall() returned unexpected error: %v", err) t.Fatalf("HttpCall() returned unexpected error: %v", err)

View File

@@ -82,7 +82,7 @@ func (m *MockIonosAPI) GetZoneId(tld string) (string, error) {
return m.GetZoneIdFunc(tld) return m.GetZoneIdFunc(tld)
} }
func (m *MockIonosAPI) HttpCall(method string, url string, body io.Reader) (*http.Response, error) { func (m *MockIonosAPI) HttpCall(method string, url string, body io.Reader, queryParams map[string]string) (*http.Response, error) {
return m.HttpCallFunc(method, url, body) return m.HttpCallFunc(method, url, body)
} }

View File

@@ -2,6 +2,7 @@ package externalIpProvider
import ( import (
"errors" "errors"
"io"
"net" "net"
"net/http" "net/http"
"net/url" "net/url"
@@ -40,12 +41,15 @@ func (p *ExternalIpProviderImplPlain) GetExternalIp() (net.IP, error) {
} }
if res.StatusCode != 200 { if res.StatusCode != 200 {
res.Body.Close()
return nil, errors.New("unexpected status code") return nil, errors.New("unexpected status code")
} }
responseBody := make([]byte, res.ContentLength) responseBody, err := io.ReadAll(res.Body)
res.Body.Read(responseBody) res.Body.Close()
defer res.Body.Close() if err != nil {
return nil, err
}
parsedIp := net.ParseIP(string(responseBody)) parsedIp := net.ParseIP(string(responseBody))
if parsedIp == nil { if parsedIp == nil {

View File

@@ -2,6 +2,8 @@ package realDynDns
import ( import (
"fmt" "fmt"
"log/slog"
"sync"
"time" "time"
"realdnydns/pkg/config" "realdnydns/pkg/config"
@@ -17,6 +19,7 @@ type ChangeDetector struct {
dnsProvider dnsProvider.DNSProvider dnsProvider dnsProvider.DNSProvider
notificationProvider notificationProvider.NotificationProvider notificationProvider notificationProvider.NotificationProvider
domains []config.DomainConfig domains []config.DomainConfig
logger *slog.Logger
} }
func New( func New(
@@ -24,12 +27,14 @@ func New(
dnsProvider dnsProvider.DNSProvider, dnsProvider dnsProvider.DNSProvider,
notificationProvider notificationProvider.NotificationProvider, notificationProvider notificationProvider.NotificationProvider,
domains []config.DomainConfig, domains []config.DomainConfig,
logger *slog.Logger,
) ChangeDetector { ) ChangeDetector {
return ChangeDetector{ return ChangeDetector{
externalIpProvider: externalIpProvider, externalIpProvider: externalIpProvider,
dnsProvider: dnsProvider, dnsProvider: dnsProvider,
notificationProvider: notificationProvider, notificationProvider: notificationProvider,
domains: domains, domains: domains,
logger: logger,
} }
} }
@@ -58,37 +63,90 @@ func (c *ChangeDetector) RunOnce() (int, error) {
} }
func (c *ChangeDetector) detectAndApplyChanges() (int, error) { func (c *ChangeDetector) detectAndApplyChanges() (int, error) {
c.logger.Info("Detecting and applying changes")
externalIp, err := c.externalIpProvider.GetExternalIp() externalIp, err := c.externalIpProvider.GetExternalIp()
if err != nil { if err != nil {
c.logger.Error("Failed to retrieve external IP", slog.String("error", err.Error()))
return 0, err return 0, err
} }
var numberUpdated int var wg sync.WaitGroup
numberUpdatedChannel := make(chan int)
for _, domain := range c.domains { for _, domain := range c.domains {
for _, subdomain := range domain.Subdomains { for _, subdomain := range domain.Subdomains {
currentRecord, err := c.dnsProvider.GetRecord(domain.TLD, subdomain) wg.Add(1)
if err != nil {
return numberUpdated, err
}
if currentRecord.IP != externalIp.String() { go func(domain config.DomainConfig, subdomain string) {
err = c.notificationProvider.SendNotification( defer wg.Done()
fmt.Sprintf("Update %s.%s", subdomain, domain.TLD),
fmt.Sprintf("The IP of %s has changed from %s to %s", domain.TLD, currentRecord.IP, externalIp.String()), c.logger.Info("Checking record",
slog.String("tld", domain.TLD),
slog.String("subdomain", subdomain),
) )
currentRecord, err := c.dnsProvider.GetRecord(domain.TLD, subdomain)
if err != nil { if err != nil {
return numberUpdated, err c.logger.Error("Failed to retrieve record",
slog.String("error", err.Error()),
slog.String("tld", domain.TLD),
slog.String("subdomain", subdomain),
)
return
} }
_, err = c.dnsProvider.UpdateRecord(domain.TLD, subdomain, externalIp, currentRecord.TTL, currentRecord.Prio, currentRecord.Disabled) if currentRecord.IP != externalIp.String() {
numberUpdated++ c.logger.Info("Record has changed",
if err != nil { slog.String("tld", domain.TLD),
return numberUpdated, err slog.String("subdomain", subdomain),
slog.String("current_ip", currentRecord.IP),
slog.String("external_ip", externalIp.String()),
)
err = c.notificationProvider.SendNotification(
fmt.Sprintf("Update %s.%s", subdomain, domain.TLD),
fmt.Sprintf("The IP of %s has changed from %s to %s", domain.TLD, currentRecord.IP, externalIp.String()),
)
if err != nil {
c.logger.Warn("Failed to send notification",
slog.String("error", err.Error()),
)
return
}
c.logger.Info("Updating record",
slog.String("tld", domain.TLD),
slog.String("subdomain", subdomain),
slog.String("current_ip", currentRecord.IP),
slog.String("external_ip", externalIp.String()),
)
_, err = c.dnsProvider.UpdateRecord(domain.TLD, subdomain, externalIp, currentRecord.TTL, currentRecord.Prio, currentRecord.Disabled)
if err != nil {
c.logger.Error("Failed to update record",
slog.String("error", err.Error()),
slog.String("tld", domain.TLD),
slog.String("subdomain", subdomain),
)
return
}
numberUpdatedChannel <- 1
} }
} }(domain, subdomain)
} }
} }
go func() {
wg.Wait()
close(numberUpdatedChannel)
}()
numberUpdated := 0
for v := range numberUpdatedChannel {
numberUpdated += v
}
c.logger.Info("Run completed", slog.Int("number_of_changes", numberUpdated))
return numberUpdated, nil return numberUpdated, nil
} }

View File

@@ -1,6 +1,7 @@
package realDynDns package realDynDns
import ( import (
"log/slog"
"net" "net"
"realdnydns/model/common" "realdnydns/model/common"
"realdnydns/pkg/config" "realdnydns/pkg/config"
@@ -72,7 +73,9 @@ func testDetectAndApplyChangesWithChanges() func(t *testing.T) {
"@", "@",
}, },
}, },
}) },
slog.Default(),
)
numberUpdated, err := changeDetector.RunOnce() numberUpdated, err := changeDetector.RunOnce()
if err != nil { if err != nil {
@@ -101,7 +104,9 @@ func testDetectAndApplyChangesWithoutChanges() func(t *testing.T) {
"@", "@",
}, },
}, },
}) },
slog.Default(),
)
numberUpdated, err := changeDetector.RunOnce() numberUpdated, err := changeDetector.RunOnce()
if err != nil { if err != nil {

11
renovate.json Normal file
View File

@@ -0,0 +1,11 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:base"],
"packageRules": [
{
"matchPackageNames": ["golang", "gomod", "go"],
"groupName": "go version",
"updateTypes": ["major", "minor", "patch"]
}
]
}