Documentation ¶
Overview ¶
This library implements a cron spec parser and runner. See the README for more details.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cron ¶
type Cron struct {
// contains filtered or unexported fields
}
Cron keeps track of any number of entries, invoking the associated func as specified by the schedule. It may be started, stopped, and the entries may be inspected while running.
type Entry ¶
type Entry struct { // The schedule on which this job should be run. *Schedule // The next time the job will run. This is the zero time if Cron has not been // started or this entry's schedule is unsatisfiable Next time.Time // The last time this job was run. This is the zero time if the job has never // been run. Prev time.Time // The Job to run. Job Job }
Entry consists of a schedule and the func to execute on that schedule.
type Schedule ¶
type Schedule struct {
Second, Minute, Hour, Dom, Month, Dow uint64
}
Schedule specifies a duty cycle (to the second granularity). Schedules are computed initially and stored as bit sets.
Click to show internal directories.
Click to hide internal directories.