Releases: go-co-op/gocron
Releases · go-co-op/gocron
v0.5.0 - DO NOT USE
❗ A bug was discovered and patched in v0.5.1
Added
- func to remove a particular job reference from the scheduler after the last execution of the job (#90) - thanks @dlaweb
Changed
Fixed
- ran go test -race and cleans up all the race conditions (#92) @JohnRoesler
- add mutex to scheduler location (#93) @JohnRoesler
Removed
- removed the deprecated StartImmediately() func (#92) @JohnRoesler
Chores
- added a makefile to enable easy fmt checks, lint, vet, test -race (#92) @JohnRoesler
- Add a contributing md (#94) @JohnRoesler
Expose job data, bugfixes, start immediately default
Added
- Expose the Job's lastRun, nextRun and runCount (#83) @arjunmahishi
Changed
scheduleNextRun
now uses duration (#79) @Streppel- Start jobs immediately by default -
StartImmediately()
has been deprecated (#82) @JohnRoesler- To achieve the prior behavior of starting after the interval, use
StartAt()
s := gocron.NewScheduler(time.UTC) _, _ = s.Every(1).Hour().StartAt(time.Now().Add(time.Hour() * 1)).Do(task) s.StartBlocking()
- To achieve the prior behavior of starting after the interval, use
Fixed
- Re-set the job's last run in scheduler run() (#81) @JohnRoesler
- Fix runnableJobs where subsequent jobs are never checked (#87) @JohnRoesler
- Handle job creation errors (#89) @arjunmahishi
Removed
Chores
- Add funding doc d12fdaf b7cd523 😃 @JohnRoesler
Fix race conditions in job counter
Fixed
- Resolve race conditions that may arise with the job counter being incremented and referenced in different go routines #74
Bugfixes
Add Monthly option and update At() func
Fix bug in removeByCondition
Fixed
- Fixed a bug in the removeByCondition func trying to access elements outside the slice range #46 - thank you @ridwanakf for your contribution!
New public API to start schedulers & functionality
Bug fixes & refactoring
Initial pre-release
We have forked this repo from https://github.com/jasonlvhit/gocron, because as the readme notes - we haven't heard from Jason in a long time and want to keep the code progressing.
This is initial release provides some changes / updates to the way the prior code performed.
Added
- added the
timeHelper
interface to abstract the use of the time package and support future time mocking for testing
Changed
- the jobs array is now a slice
- the scheduling logic was transferred from the job handling scheduling itself to the scheduler handling scheduling of all jobs
.From(gocron.NextTick)
was changed to.StartImmediately
- moved
StartAt
into the scheduler - the scheduler stopped chan uses an empty struct instead of a bool
Removed
- removed the default scheduler
- removed the
mustInterval
func -Second
andSeconds
provide the same behavior and are for grammar / semantics only at this point