parseCronFrequency() in internal/scheduler/scheduler.go:1251 uses a hardcoded switch with only 5 values (1m, 20m, 1h, 2h, 1d). Any other input silently falls back to 1 hour.
Current behavior:
func parseCronFrequency(freq string) time.Duration {
switch freq {
case "1m": return 1 * time.Minute
case "20m": return 20 * time.Minute
case "1h": return 1 * time.Hour
case "2h": return 2 * time.Hour
case "1d": return 24 * time.Hour
default: return 1 * time.Hour
}
}
Expected behavior:
Parse arbitrary duration strings like 6h, 16m, 45m, 3d, 30s. Use a simple suffix-based parser (e.g. time.ParseDuration for Go-compatible suffixes, plus custom d suffix for days).
Acceptance criteria:
parseCronFrequency()ininternal/scheduler/scheduler.go:1251uses a hardcoded switch with only 5 values (1m,20m,1h,2h,1d). Any other input silently falls back to 1 hour.Current behavior:
Expected behavior:
Parse arbitrary duration strings like
6h,16m,45m,3d,30s. Use a simple suffix-based parser (e.g.time.ParseDurationfor Go-compatible suffixes, plus customdsuffix for days).Acceptance criteria:
Nm,Nh,Nd,Nswhere N is any positive integer