Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ScheduleSpec ¶
type ScheduleSpec struct {
// contains filtered or unexported fields
}
func ParseCronSchedule ¶
func ParseCronSchedule(interval string) (*ScheduleSpec, error)
ParseCronSchedule can parse standard cron notation it returns a new crontab schedule representing the given standardSpec (https://en.wikipedia.org/wiki/Cron). It requires 5 entries representing: minute, hour, day of month, month and day of week, in that order. It returns a descriptive error if the spec is not valid.
It accepts
- Standard crontab specs, e.g. "* * * * ?"
- Descriptors, e.g. "@midnight", "@every 1h30m"
func (*ScheduleSpec) IsSubDaily ¶ added in v0.22.14
func (s *ScheduleSpec) IsSubDaily() bool
IsSubDaily checks if the cron schedule runs more than once a day. For example, these crons are considered as sub-daily:
- "0 * * * *" (every hour)
- "*/30 * * * *" (every 30 minutes)
- "0 */6 * * *" (every 6 hours)
- "0 0-23/2 * * *" (every 2 hours)
Click to show internal directories.
Click to hide internal directories.