Skip to content

Releases: go-co-op/gocron

v0.6.0

09 Feb 15:36
507947a
Compare
Choose a tag to compare
v0.6.0 Pre-release
Pre-release

Added

  • allow starting Jobs at a date in the past (#113) @calvinmclean
  • add job limit and remove after last run to scheduler chain (#116) @JohnRoesler
  • scheduler.Every() now accepts int, time.Duration, and string to allow any desired duration between runs (#119) @JohnRoesler

Changed

  • sets the default unit to seconds (#112) @JohnRoesler
  • catches a bad interval of 0 with an error (#112) @JohnRoesler
  • clarified several function names and accepted values (#121) @JohnRoesler
    • The job Tag func now accepts a variadic string parameter instead of a slice
    • The scheduler SetTag is now Tag and also accepts a variadic string parameter
    • The scheduler RemoveJobByTag is now RemoveByTag to be consistent with Remove and RemoveByReference
    • The scheduler RunAllWithDelay func now accepts a time.Duration instead of an int representing seconds
    • The scheduler Scheduled func is now TaskPresent - scheduled was confusing name because until the scheduler is started, it's not actually "scheduled to run". Now you can check whether the task is present in the scheduler.

Fixed

  • fixed the bug with jobs not being stopped upon removal (5027f53) thanks @huage1994
  • catches nil timer with stopTimer() func (#112) @JohnRoesler
  • fix a bug where the monthly calculation failed rounding to midnight (#104) @sdw2330976
  • fix bug with limit runs to not stopping jobs (#114) @JohnRoesler

Removed

Chores

v0.5.1

15 Jan 16:27
e0835f6
Compare
Choose a tag to compare
v0.5.1 Pre-release
Pre-release

Fixed

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