-
Notifications
You must be signed in to change notification settings - Fork 345
Commit d299c45
committed
* seperated the Scheduler and Job into seprate go files
* Scheduler Changes
* refactored the Scheduler into an interface so that we can potentially swap out implementations (see pull #8)
* changed `Scheduler.Start() chan bool` to `Scheduler.Start()`
* added `Scheduler.IsRunning()` and `Scheduler.Stop()` to check if the scheduler is running and to stop it from ronning, respectively
* Renamed `Scheduler.RunAllwithDelay` to `Scheduler.RunAllWithDelay` to match standard syntax
* Added runPending(time.Time) in order to synchronize all rin loops on the ticker time
* Added a mutex lock for concurrency support
* Added default location support at the scheduler lever with `Scheduler.Location(...)`
* Job Changes
* moved all initialization logic into `init(time.Time)` and `isInit() bool` for code clarity and testability
* changed `shouldRun() bool` to `shouldRun(time.Time) bool` in order to accept a passed in time from the current ticker iteration, for run loop synchronicity
* rewrote `At(...)` to parse into a time.Duration
* added support for intervals greater than 1 for days of the week
* added `Weekday(time.Weekday)` and made `Sunday()`, `Monday()`, ... alises of it
* added `time.Location` support on a per job basis
* standardized the comment structure and added some better godoc documentation
* added support for intervals greater than 1 for any weekday with a strongly defined edge case behavior added to the docs
* fixed #4, by removing the panics in Day, Hour, Minute, Second, etc
* added basic test structure
* removed the global `ChangeLoc(...)` method. In favor of setting the default via the scheduler and on a per job baisis
* finish writing tests and make sure they all pass
* write examples
* update ReadMe.md1 parent b075c79 commit d299c45Copy full SHA for d299c45
File tree
Expand file treeCollapse file tree
4 files changed
+757
-482
lines changedFilter options
Expand file treeCollapse file tree
4 files changed
+757
-482
lines changed
0 commit comments