Skip to content

Releases: go-co-op/gocron

v1.1.0

26 Mar 15:52
d70cabe
Compare
Choose a tag to compare

Added

  • validation of the length of Do() function parameters - a mismatch returns an error (#144) - thanks @mikhailbolshakov

First stable release!

13 Mar 04:15
a55ceb8
Compare
Choose a tag to compare

Here we go folks. Thanks for all the feedback as we've worked towards this major release. It's been a long time coming and it's finally here.

Keep the issue reports and feature requests coming! Keep on coding out there.

v0.8.0

11 Mar 04:11
a55ceb8
Compare
Choose a tag to compare
v0.8.0 Pre-release
Pre-release

Added

  • when multiple errors occur creating a job, they are now wrapped and returned (#130) @JohnRoesler
  • allowing the enforcement of unique tags when set through the scheduler with Scheduler.TagsUnique() (#136) @JohnRoesler
  • a new explicit interval func Milliseconds() - this was already available through Every(500ms) (#137) @JohnRoesler

Changed

  • the Job.Err func has been renamed Job.Error (#137) @JohnRoesler
  • the default behavior of LimitRunsTo removes the job from the scheduler (#137) @JohnRoesler
    • nothing can be done with a stopped job in the scheduler so we opted to remove the job instead
  • At() now accepts either string or time.Time (parses out only h,m,s) (#137) @JohnRoesler

Removed

Chores

v0.7.1

05 Mar 04:48
88f1ca4
Compare
Choose a tag to compare
v0.7.1 Pre-release
Pre-release

Fixed

  • Clear() now properly stops all jobs before removing them from the scheduler (#134) @JohnRoesler

Chores

  • Updated the readme with details around different job modes and combinations of schedule options (2a8757a) @JohnRoesler

v0.7.0

26 Feb 19:03
f251977
Compare
Choose a tag to compare
v0.7.0 Pre-release
Pre-release

Added

  • singleflight mode, if the same job tries to run again while a previous run hasn't finished yet, it will either wait to run or skip the run (#123) thanks @farwydi
  • the ability to limit the number of concurrent jobs, useful for resource intensive jobs (#126) thanks @dustin-decker

Changed

  • we now send jobs to a job executor through channels instead of handling them directly in the scheduler, allowing us to get rid of many mutexes (#122) @JohnRoesler

Fixed

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