Documentation
¶
Overview ¶
Package cron reads the five fields of a cron expression, minute, hour, day of the month, month and day of the week, and tells the times they match.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Schedule ¶
type Schedule struct {
// contains filtered or unexported fields
}
Schedule is the times a cron expression matches.
func Parse ¶
Parse reads expr, five fields apart by white space. Each field is *, a value, a range a-b, either with a step as */n or a-b/n, or a list of them apart by commas. A month and a day of the week can be named by the first three letters of their names in English.
func (*Schedule) Next ¶
Next returns the first time after t that s matches, to the minute, on the wall clock of the location of t, and false when there is none in the five years after t. A time the clock skips, as it does when daylight saving time starts, is not matched. A time it shows twice, as it does when it ends, is matched once, unless the hour field starts with *: such a schedule is matched in both, as cron runs it.