Versions in this module Expand all Collapse all v0 v0.1.0 Mar 30, 2021 Changes in this version + const MAXJOBNUM + 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") + func ChangeLoc(newLocation *time.Location) + func Clear() + func NextTick() *time.Time + func Remove(j interface{}) + func RunAll() + func RunAllwithDelay(d int) + func RunPending() + func Scheduled(j interface{}) bool + func SetLocker(l Locker) + func Start() chan bool + type Job struct + func Every(interval uint64) *Job + func Jobs() []*Job + func NewJob(interval uint64) *Job + func NextRun() (job *Job, time time.Time) + func (j *Job) At(t string) *Job + func (j *Job) Day() *Job + func (j *Job) Days() *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) Friday() *Job + func (j *Job) From(t *time.Time) *Job + func (j *Job) GetAt() string + func (j *Job) GetWeekday() time.Weekday + func (j *Job) Hour() *Job + func (j *Job) Hours() *Job + func (j *Job) Loc(loc *time.Location) *Job + func (j *Job) Lock() *Job + func (j *Job) Minute() *Job + func (j *Job) Minutes() *Job + func (j *Job) Monday() (job *Job) + func (j *Job) NextScheduledTime() time.Time + func (j *Job) Saturday() *Job + func (j *Job) Second() *Job + func (j *Job) Seconds() *Job + func (j *Job) Sunday() *Job + func (j *Job) Tag(t string, others ...string) + func (j *Job) Tags() []string + func (j *Job) Thursday() *Job + func (j *Job) Tuesday() *Job + func (j *Job) Untag(t string) + func (j *Job) Wednesday() *Job + func (j *Job) Week() *Job + func (j *Job) Weekday(startDay time.Weekday) *Job + func (j *Job) Weeks() *Job + type Locker interface + Lock func(key string) (bool, error) + Unlock func(key string) error + type Scheduler struct + func NewScheduler() *Scheduler + func (s *Scheduler) ChangeLoc(newLocation *time.Location) + func (s *Scheduler) Clear() + func (s *Scheduler) Every(interval uint64) *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) RunAll() + func (s *Scheduler) RunAllwithDelay(d int) + func (s *Scheduler) RunPending() + func (s *Scheduler) Scheduled(j interface{}) bool + func (s *Scheduler) Start() chan bool + func (s *Scheduler) Swap(i, j int)