Documentation
¶
Overview ¶
Package cron parses five-field cron expressions and computes their schedule, in UTC or in a time zone.
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 a parsed cron expression.
func Parse ¶
Parse parses "minute hour day-of-month month day-of-week" (each field: *, a number, a range a-b, a list, and /step; month and weekday names work) or one of @hourly, @daily, @weekly, @monthly, @yearly. As in classic cron, when both day fields are restricted a time matches if either does.
func (*Schedule) In ¶ added in v0.8.0
In returns the schedule read in loc: its fields are wall-clock times there.
Daylight saving follows the usual cron rules. When the clocks go forward, a time that doesn't exist that day runs once, right after the gap. When they go back, a schedule with fixed hours runs once for a repeated time, at its first occurrence; one that matches every hour runs throughout.