Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNoNextFound = fmt.Errorf("no next time found")
ErrNoNextFound is returned when no no next time could be found
Functions ¶
This section is empty.
Types ¶
type Schedule ¶
type Schedule struct { cron.Schedule // The week of the year to run the job // 1-53 or @odd, @even // Empty matches any week of the year IsoWeek string }
Schedule is a wrapper around cron.Schedule that adds the IsoWeek field
func (Schedule) Next ¶
Next returns the next activation time of the schedule after the earliest time. If the schedule is invalid, it will return an error. If the schedule is valid but no next time could be found (too far in the future), it will return an error with ErrNoNextFound.
func (Schedule) NextN ¶
NextN returns the next n activation times of the schedule after the earliest time. If the schedule is invalid, it will return an error. If the schedule is valid but no next time could be found (too far in the future), it will return an error with ErrNoNextFound. If an error occurs the returned slice will contain len() valid activation times that were found before the error occurred.