Versions in this module Expand all Collapse all v1 v1.0.1 Mar 28, 2023 Changes in this version + const DefaultKeyCleared + const DefaultKeyPrefix + type ConstantDelaySchedule struct + Delay time.Duration + func (schedule ConstantDelaySchedule) Next(t time.Time) time.Time + type Cron struct + ErrorLog Logger + func New(pool *redis.Pool) *Cron + func NewWithLocation(location *time.Location, pool *redis.Pool) *Cron + func (c *Cron) AddFunc(spec string, cmd func()) error + func (c *Cron) AddJob(spec string, cmd Job) error + func (c *Cron) Entries() []*Entry + func (c *Cron) Location() *time.Location + func (c *Cron) Run() + func (c *Cron) SetDefaultClearedKey(keyCleared string) + func (c *Cron) SetKeyPrefix(prefix string) + func (c *Cron) SetNoRepeat(no bool) + func (c *Cron) Start() + func (c *Cron) Stop() + type Entry struct + Job Job + Next time.Time + Prev time.Time + Schedule Schedule + Spec string + type FuncJob func() + func (f FuncJob) Name() string + func (f FuncJob) Run() + type Job interface + Name func() string + Run func() + type Logger interface + Errorf func(format string, v ...interface{}) + type ParseOption int + const Descriptor + const Dom + const Dow + const DowOptional + const Hour + const Minute + const Month + const Second + type Parser struct + func NewParser(options ParseOption) Parser + func (p Parser) Parse(spec string) (Schedule, error) + type Schedule interface + Next func(time.Time) time.Time + func Parse(spec string) (Schedule, error) + func ParseStandard(standardSpec string) (Schedule, error) + type SpecSchedule struct + Dom uint64 + Dow uint64 + Hour uint64 + Minute uint64 + Month uint64 + Second uint64 + func (s *SpecSchedule) Next(t time.Time) time.Time