Fix scheduler cleanup edge cases
Some checks failed
ci / openapi (push) Failing after 6s
ci / agent (push) Failing after 5s
ci / server (push) Failing after 7s
ci / stack-smoke (push) Has been skipped
ci / web (push) Failing after 6s

This commit is contained in:
Stanislav Rossovskii
2026-06-23 20:04:08 +04:00
parent a94e0deaba
commit 762c48e96b
5 changed files with 69 additions and 20 deletions

View File

@@ -217,7 +217,7 @@ func (c *Config) Validate() error {
return fmt.Errorf("check %q: timeout must be > 0", ch.ID)
}
if ch.Interval.Duration < 0 {
return fmt.Errorf("check %q: interval must be > 0", ch.ID)
return fmt.Errorf("check %q: interval must not be negative", ch.ID)
}
ch.Cron = strings.TrimSpace(ch.Cron)
hasInterval := ch.Interval.Duration > 0