Daily parses a Schedule from spec scoped to a recurring daily event. Spec consists of the following space-delimited fields, in the following order: - timezone e.g. CRON_TZ=US/Central (optional) - minutes of hour e.g. 30 (required) - hour of day e.g. 9 (required) - day of month (must be *) - month (m
(raw string)
| 64 | // fmt.Println(sched.Next(time.Now()).Format(time.RFC3339)) |
| 65 | // // Output: 2022-04-04T14:30:00Z |
| 66 | func Daily(raw string) (*Schedule, error) { |
| 67 | if err := validateDailySpec(raw); err != nil { |
| 68 | return nil, xerrors.Errorf("validate daily schedule: %w", err) |
| 69 | } |
| 70 | |
| 71 | return parse(raw) |
| 72 | } |
| 73 | |
| 74 | // TimeRange parses a Schedule from a cron specification interpreted as a continuous time range. |
| 75 | // |