Documentation ¶
Index ¶
- Constants
- Variables
- func Author() string
- func License() string
- func Version() string
- type Job
- type Rule
- type Service
- func (s *Service) Add(rule string, loop func(), tidy ...func()) (string, error)
- func (s *Service) Del(id string)
- func (s *Service) Empty()
- func (s *Service) Has(id string) bool
- func (s *Service) Len() int
- func (s *Service) Set(id, rule string, loop func(), tidy ...func()) error
- func (s *Service) Wait()
Constants ¶
View Source
const ( Second = iota Minute Hour DayOfMonth Month DayOfWeek )
Field type of rule
Variables ¶
View Source
var ( // MonthsMap is month string to int map MonthsMap = map[string]int{ "jan": 1, "feb": 2, "mar": 3, "apr": 4, "may": 5, "jun": 6, "jul": 7, "aug": 8, "sep": 9, "oct": 10, "nov": 11, "dec": 12, } // DayOfWeekMap is day of week string to int map DayOfWeekMap = map[string]int{ "sun": 0, "mon": 1, "tue": 2, "wed": 3, "thu": 4, "fri": 5, "sat": 6, } )
Functions ¶
Types ¶
type Rule ¶
type Rule struct { Second []int Minute []int Hour []int DayOfMonth []int Month []int DayOfWeek []int }
Rule is parsed cron rule
Click to show internal directories.
Click to hide internal directories.