Releases: go-co-op/gocron
v2.0.0-alpha-3
What's Changed
- resolved some cases where the scheduler would be blocked when shutting down. Gotta be careful not be blocked when publishing or consuming from a channel.
select
is a good friend! - added a bunch more tests and inline comments to help make it clear to anyone reading the code what's going on
- protected the standard job shutdown waitgroup with a mutex (hopefully that's the only mutex in the project)
Full Changelog: v2.0.0-alpha-2...v2.0.0-alpha-3
v2.0.0-alpha-2
What's Changed
- Cleaned up the redundancy on the job definitions where each one was requiring the task and options, and instead just moved that into the
NewJob
function on the scheduler. - add daily job
- support reschedule and wait modes on job singleton mode
Full Changelog: v2.0.0-alpha-1...v2.0.0-alpha-2
v1.35.3
What's Changed
- main branch renamed to v1 (#593) by @JohnRoesler in #594
- fix: set multi-weekdays bug about issue-590 by @XiXiangFiles in #592
- Avoid allocations with
(*regexp.Regexp).MatchString
by @Juneezee in #602 - Bump github.com/google/uuid from 1.3.1 to 1.4.0 by @dependabot in #604
- fix(scheduler): ensure negative intervals given to
Every
return an immediate error #600 by @husam-e in #603
New Contributors
Full Changelog: v1.35.2...v1.35.3
v2.0.0-alpha-1
gocron v2
This is an early and incomplete release of v2 for gocron. The goal here is to give you all a chance to start playing around with the interfaces and functionality and give feedback.
From the v2 issue:
The main focuses are:
- no more sharing our resources across goroutines and therefore no mutexes!
- redesigning the scheduler to be an interface (to allow for easier testing by users)
- the new job definitions will remove all the potential issues of pairing incompatible types / features together and focus on a complete definition of configuration needed for that particular type of job
- keeping feature parity close to v1 (although might be a few minor losses of un-tenable features)
Quite a few of the main features are implemented and working.
- easier manipulation of time in testing thanks to https://github.com/jonboulle/clockwork
- duration, cron, weekly, monthly, and random jobs
- lots of job and scheduler options (e.g. singleton, limit mode)
The best place to discuss v2 is: #576
Please give feedback! (Reach out on slack if you're interested in contributing so we can coordinate work 😄 )
v1.35.2
What's Changed
- Revert "fix: setting weeks interval greater than 1 with a weekday, scheduling too early by @XiXiangFiles" by @JohnRoesler in #591
- This will require more testing and likely some rework of the week functionality. This change, while some might consider it a fix, broke the current behavior that has been relied upon.
Full Changelog: v1.35.1...v1.35.2
v1.35.1
What's Changed
- fix: setting weeks interval greater than 1 with a weekday, scheduling too early by @XiXiangFiles in #588
- fix concurrent access to jobs map by @JohnRoesler in #589
New Contributors
- @XiXiangFiles made their first contribution in #588
Full Changelog: v1.35.0...v1.35.1
v1.35.0
What's Changed
- add GetName() to Job to expose job name by @JohnRoesler in #583
Full Changelog: v1.34.2...v1.35.0
v1.34.2
Fixes
- fix: removing a job, the job was not being stopped with limit mode by @JohnRoesler in #573
- fix Scheduler.NextRun() not returning the correct value (#574) by @bbaa-bbaa in #575
New Contributors
- @bbaa-bbaa made their first contribution in #575
Full Changelog: v1.34.1...v1.34.2
v1.34.1
Fixes
- docs: fix WaitMode and Milliseconds documentation by @husam-e in #570
- reschedule limit mode was broken - fixing the inc/dec by @JohnRoesler in #572
New Contributors
Full Changelog: v1.34.0...v1.34.1
v1.34.0
What's Changed
- feat: add election leader by @rfyiamcool in #561
Fixes
- fix: block unlock with limit concurrency by @rfyiamcool in #559
- fix: data race for get jobs map by @rfyiamcool in #558
- fix RemoveByID and SingletonMode by @JohnRoesler in #569
Chores
- Bump actions/checkout from 3 to 4 by @dependabot in #560
- docs: add stop and stopBlockingChan function by @rfyiamcool in #556
- docs: add WithDistributedElector usage by @rfyiamcool in #563
- remove beta note from WithDistributedLocker by @JohnRoesler in #562
Full Changelog: v1.33.1...v1.33.2