Documentation
¶
Overview ¶
Package cron parses and evaluates five-field cron expressions: minute, hour, day of month, month and day of week.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrSyntax = errors.New("invalid cron expression")
ErrSyntax is wrapped by every error Parse returns.
Functions ¶
This section is empty.
Types ¶
type Schedule ¶
type Schedule struct {
// contains filtered or unexported fields
}
Schedule is a parsed expression.
func Parse ¶
Parse reads an expression such as "*/15 4-6 * * 1,3,5". Each field takes "*", numbers, ranges (a-b), lists (a,b,c) and steps (*/n, a-b/n, a/n). Sunday is 0 or 7.
func (Schedule) Last ¶
Last returns the latest time at or before t, within the given window, at which the schedule fires, or the zero time.
Click to show internal directories.
Click to hide internal directories.