(startPos int, hasWeekdaysSuffix bool)
| 237 | } |
| 238 | |
| 239 | func (p *ScheduleParser) validateIntervalTimeClause(startPos int, hasWeekdaysSuffix bool) error { |
| 240 | endPos := len(p.tokens) |
| 241 | if hasWeekdaysSuffix { |
| 242 | endPos -= 2 |
| 243 | } |
| 244 | for i := startPos; i < endPos; i++ { |
| 245 | if p.tokens[i] == "at" { |
| 246 | return errors.New("interval schedules cannot have 'at time' clause") |
| 247 | } |
| 248 | } |
| 249 | return nil |
| 250 | } |
| 251 | |
| 252 | func validateMinimumInterval(interval int, unit string) error { |
| 253 | totalMinutes, err := intervalToMinutes(interval, unit) |
no outgoing calls
no test coverage detected