Skip to content

Releases: go-co-op/gocron

v0.5.0 - DO NOT USE

31 Dec 21:13
7eacf6d
Compare
Choose a tag to compare
v0.5.0 - DO NOT USE Pre-release
Pre-release

❗ 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

  • refactor scheduler to schedule jobs with time.AfterFunc() (#99) @Streppel

Fixed

Removed

Chores

Expose job data, bugfixes, start immediately default

11 Dec 20:01
5ed8230
Compare
Choose a tag to compare

Added

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()
      

Fixed

Removed

Chores

Fix race conditions in job counter

10 Nov 05:11
0969260
Compare
Choose a tag to compare
Pre-release

Fixed

  • Resolve race conditions that may arise with the job counter being incremented and referenced in different go routines #74

Bugfixes

03 Nov 13:42
daf5304
Compare
Choose a tag to compare
Bugfixes Pre-release
Pre-release

Added

  • Add a new Job method called 'LimitRunsTo' (#67)

Changed

  • rewriting scheduler logic (#54)
  • regex for at time accepts time without leading zeros (#56)

Fixed

  • Make sure Do() does not override the nextRun time when StartAt() is used (#49)
  • scheduler schedules jobs registration when already running (#61)

Chores

  • Add godoc badge to README (#51)
  • removing legacy deterministic tests (#62)
  • Add examples from README to example_test.go (#66)
  • add go 1.15 to testing matrix and remove 1.13 (#68)

Add Monthly option and update At() func

21 Jul 19:40
3f4608d
Compare
Choose a tag to compare
Pre-release

Added

  • Add Monthly() frequency #47

Changed

  • Changed the At() func to parse using time.Parse instead of Atoi #48

Fix bug in removeByCondition

16 Jul 15:29
5af127a
Compare
Choose a tag to compare
Pre-release

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

12 May 20:07
4cc1bfb
Compare
Choose a tag to compare

Bug fixes & refactoring

10 Apr 20:07
602934f
Compare
Choose a tag to compare
Pre-release

Added

  • Started an example_test.go file to provide examples in our go documentation #15

Changed

  • Moved job locker into separate package #21
  • Fixed bug where jobs were executed twice in a row #20 #23

Initial pre-release

28 Mar 19:55
85bbc7c
Compare
Choose a tag to compare
Initial pre-release Pre-release
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 and Seconds provide the same behavior and are for grammar / semantics only at this point