Versions in this module Expand all Collapse all v0 v0.1.2 Jul 31, 2020 Changes in this version + var ErrNotAFunction = errors.New("only functions can be schedule into the job queue") + var ErrParameterCannotBeNil = errors.New("nil paramaters cannot be used with reflection") + var ErrParamsNotAdapted = errors.New("the number of params is not adapted") + var ErrPeriodNotSpecified = errors.New("unspecified job period") + var ErrTimeFormat = errors.New("time format error") + type Job struct + func NewJob(interval time.Duration) *Job + func (j *Job) Do(jobFun interface{}, params ...interface{}) error + func (j *Job) DoSafely(jobFun interface{}, params ...interface{}) error + func (j *Job) Err() error + func (j *Job) From(t time.Time) *Job + func (j *Job) FromMidNight() *Job + func (j *Job) Immediately() *Job + func (j *Job) NextScheduledTime() time.Time + func (j *Job) Once() *Job + func (j *Job) SetTags(tags ...string) + func (j *Job) Tags() []string + func (j *Job) Untag(t string) + type Scheduler struct + func NewScheduler() *Scheduler + func (s *Scheduler) Clear() + func (s *Scheduler) Every(interval time.Duration) *Job + func (s *Scheduler) Jobs() []*Job + func (s *Scheduler) Len() int + func (s *Scheduler) Less(i, j int) bool + func (s *Scheduler) NextRun() (*Job, time.Time) + func (s *Scheduler) Remove(j interface{}) + func (s *Scheduler) RemoveByRef(j *Job) + func (s *Scheduler) RemoveByTag(tag string) + func (s *Scheduler) RunAll() + func (s *Scheduler) RunAllwithDelay(d time.Duration) + func (s *Scheduler) Scheduled(j interface{}) bool + func (s *Scheduler) Start() + func (s *Scheduler) StartAsync() chan struct{} + func (s *Scheduler) Stop() + func (s *Scheduler) Swap(i, j int)