Versions in this module Expand all Collapse all v0 v0.0.1 Oct 27, 2020 Changes in this version + type Cron struct + func New() *Cron + func (c *Cron) AddFunc(spec string, f func()) (TaskID, error) + func (c *Cron) AddJob(spec string, job Job) (TaskID, error) + func (c *Cron) Error(err error, value ...interface{}) + func (c *Cron) Info(value ...interface{}) + func (c *Cron) Schedule(schedule Schedule, cmd Job) TaskID + func (c *Cron) Start() + type FuncJob func() + func (f FuncJob) Run() + type Job interface + Run func() + type LogFormatter func(Values ...interface{}) string + type Logger interface + Error func(err error, value ...interface{}) + Info func(values ...interface{}) + var DefaultLogger Logger = PrintfLogger(os.Stdout, defaultFormat) + func PrintfLogger(o io.Writer, f LogFormatter) Logger + type ParseOption int + type Parser struct + func NewParser(options ParseOption) Parser + func (P Parser) Parse(spec string) (Schedule, error) + type PrintLogger struct + Format LogFormatter + func (l PrintLogger) Error(err error, values ...interface{}) + func (l PrintLogger) Info(values ...interface{}) + type Schedule interface + Next func(time.Time) time.Time + type ScheduleParser interface + Parse func(spec string) (Schedule, error) + type SpecSchedule struct + func (s *SpecSchedule) Next(t time.Time) time.Time + type Task struct + ID TaskID + Job Job + Next time.Time + Prev time.Time + Schedule Schedule + type TaskID int