Commit Graph

27 Commits

Author SHA1 Message Date
Copilot 5b307f56dd
docs: clarify NextRun/NextRuns require scheduler to be started (#910)
* Initial plan

* docs: clarify NextRun and NextRuns return empty values until scheduler is started

Co-authored-by: JohnRoesler <19351306+JohnRoesler@users.noreply.github.com>

* docs: remove unhelpful inline comments from NextRun/NextRuns examples

Co-authored-by: JohnRoesler <19351306+JohnRoesler@users.noreply.github.com>
Agent-Logs-Url: https://github.com/go-co-op/gocron/sessions/9686e808-ae5e-4bc8-ad00-f78a1a7b079d

* docs: restore inline comments for NextRun/NextRuns examples

Co-authored-by: JohnRoesler <19351306+JohnRoesler@users.noreply.github.com>
Agent-Logs-Url: https://github.com/go-co-op/gocron/sessions/df5afb1e-5c66-4615-9967-a2efc2419d87

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JohnRoesler <19351306+JohnRoesler@users.noreply.github.com>
2026-03-20 11:58:16 -05:00
John Roesler 7a1855ef7a
feat: expose default cron implementation (#906) 2025-12-10 13:57:36 -06:00
Yash Chauhan 3ee53e03d9
feat: Add option to calculate intervals from job completion time for interval-based scheduling (fixes #565) (#884) 2025-10-21 22:09:46 -05:00
John Roesler 6a30d6d8b9
feat: add WithStartDateTimePast WithStartAt option (#882) 2025-10-09 21:45:13 -05:00
apocelipes b383ca99c5
Use `errors.New` for non-formatted strings (#870) 2025-09-02 08:48:40 -05:00
John Roesler e1b7d52ebc
ExampleWithCronImplementation 2025-02-25 07:47:40 -06:00
John Roesler d736ca28f5
go to 1.21, upgrade deps (#822)
* go to 1.21, upgrade deps

* test without 1.23
2025-01-29 10:37:12 -06:00
John Roesler 6133a24ae2
clarify context docs 2025-01-23 14:21:18 -06:00
John Roesler 96fe017828
clarify context docs 2025-01-23 14:09:03 -06:00
John Roesler 8df2bbf7cd
clarify context docs 2025-01-23 14:07:29 -06:00
John Roesler ce204f9d74
check context not nil, and update test and docs (#820) 2025-01-23 13:30:12 -06:00
Tom Morelly cc66c780d8
feat(eventListener): add BeforeJobRunsSkipIfBeforeFuncErrors() (#813) 2025-01-08 19:21:13 -06:00
John Roesler abfd9e5dcc
update examples 2025-01-03 15:47:57 -06:00
Derrick Hammer 63a6458a5b
feat: add WithIdentifier (#753) (#754) 2024-07-10 09:51:37 -05:00
Rodrigo Broggi 64d6e48dae
issue-740: expand oneTimeJob to support multiple times (#741) 2024-06-21 16:51:42 -05:00
Manuel Doncel Martos 894970124c
after lock error listener (#734)
* after job listener

* fixing lint issues

---------

Co-authored-by: lv90no <manuel.doncel.martos@ing.com>
2024-06-19 06:33:50 -05:00
John Roesler 525b361a3f
adding Job.NextRuns to provide n next run times (#729)
* adding Job.NextRuns to provide n next run times

* skip test in ci

* skip test in ci
2024-05-06 14:07:44 -05:00
John Roesler ebec5e9f91
elector & locker were failing to send out when not leader (#688)
* elector & locker were failing to send out when not leader

* update test to confirm non-active elector/locker are checked

* clean up data race

* try to make test more reliable
2024-03-12 08:37:11 -05:00
John Roesler 5c69001e27
Add job monitor interface to allow for collecting job metrics (#659)
* Add metrics each run of job

* Fix lint

* Fix test lint

* Fix backwards job status

* Add tags

* Comment example

* Rename it

* Fix some names

* Fix readme

* update readme, examples, naming

* fix unrelated test that was leaking scheduler

* remove overzealous leak detection

* rename interface methods

---------

Co-authored-by: gorodet-sky <gorodetsky.dev@gmail.com>
2024-01-17 15:39:11 -06:00
John Roesler 800821c923
wait for new job to be fully created before returning (#658) 2024-01-17 11:48:25 -06:00
John Roesler 848adb4508
fix example sorting 2023-12-21 13:45:13 -06:00
John Roesler a51820e30f
fixup Job and Scheduler interface docs 2023-12-20 15:16:16 -06:00
John Roesler 6e15f16d77
add new features, OneTimeJob and Job.RunNow() (#646) 2023-12-18 21:13:37 -06:00
John Roesler 8c628fae2d
add job name to event listners (#621)
* add job name to event listners

* missed the examples

* missed executor
2023-11-14 11:39:27 -06:00
John Roesler 7fea987137
add distributed locker for v2 (#614)
* add distributed locker for v2

* fix logger test

* enhance logger test
2023-11-14 09:56:05 -06:00
John Roesler 6f9a8200f4
support go 1.20+ (#608) 2023-11-09 09:49:21 -06:00
John Roesler ad26a71e0e
initial clean v2 commit history 2023-11-08 11:11:42 -06:00