MCPcopy Create free account
hub / github.com/github/gh-aw / validateIntervalTimeClause

Method validateIntervalTimeClause

pkg/parser/schedule_parser.go:239–250  ·  view source on GitHub ↗
(startPos int, hasWeekdaysSuffix bool)

Source from the content-addressed store, hash-verified

237}
238
239func (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
252func validateMinimumInterval(interval int, unit string) error {
253 totalMinutes, err := intervalToMinutes(interval, unit)

Callers 2

parseLongIntervalMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected