Documentation
¶
Overview ¶
Package cron parses cron expressions and finds the times they match in a timezone.
Expressions have five fields (minute, hour, day of month, month, day of week) with *, lists, ranges, steps and three-letter names, or one of the macros @yearly, @annually, @monthly, @weekly, @daily, @midnight and @hourly. As in Vixie cron, when both day fields are restricted (neither starts with *), a day matches if either matches.
Times are matched on the wall clock of the schedule's timezone. Across a daylight saving change, a time in the skipped hour fires at the first instant after the gap, and a time in the repeated hour fires once, at its first occurrence.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Schedule ¶
type Schedule struct {
// contains filtered or unexported fields
}
Schedule is a parsed cron expression.
func Parse ¶
Parse parses a cron expression. It rejects expressions that never match, such as February 30th.