Versions in this module Expand all Collapse all v1 v1.2.0 Mar 17, 2018 Changes in this version + var AdminTaskList map[string]Tasker + func AddTask(taskname string, t Tasker) + func DeleteTask(taskname string) + func StartTask() + func StopTask() + type MapSorter struct + Keys []string + Vals []Tasker + func NewMapSorter(m map[string]Tasker) *MapSorter + func (ms *MapSorter) Len() int + func (ms *MapSorter) Less(i, j int) bool + func (ms *MapSorter) Sort() + func (ms *MapSorter) Swap(i, j int) + type Schedule struct + Day uint64 + Hour uint64 + Minute uint64 + Month uint64 + Second uint64 + Week uint64 + func (s *Schedule) Next(t time.Time) time.Time + type Task struct + DoFunc TaskFunc + ErrLimit int + Errlist []*taskerr + Next time.Time + Prev time.Time + Spec *Schedule + SpecStr string + Taskname string + func NewTask(tname string, spec string, f TaskFunc) *Task + func (t *Task) GetNext() time.Time + func (t *Task) GetPrev() time.Time + func (t *Task) GetSpec() string + func (t *Task) GetStatus() string + func (t *Task) Run() error + func (t *Task) SetCron(spec string) + func (t *Task) SetNext(now time.Time) + func (t *Task) SetPrev(now time.Time) + type TaskFunc func() error + type Tasker interface + GetNext func() time.Time + GetPrev func() time.Time + GetSpec func() string + GetStatus func() string + Run func() error + SetNext func(time.Time) + SetPrev func(time.Time)