diff --git a/pkg/snapshot/snapshotter/snapshotter.go b/pkg/snapshot/snapshotter/snapshotter.go index 8a2846749..ccfb9dece 100644 --- a/pkg/snapshot/snapshotter/snapshotter.go +++ b/pkg/snapshot/snapshotter/snapshotter.go @@ -793,11 +793,11 @@ func (ssr *Snapshotter) GetFullSnapshotMaxTimeWindow(fullSnapScheduleSpec string return defaultFullSnapMaxTimeWindow } - if schedule[dayOfMonth] == "*" && schedule[dayOfWeek] == "*" && !strings.Contains(schedule[hour], "/") { - return defaultFullSnapMaxTimeWindow - } else if schedule[dayOfWeek] != "*" { + if schedule[dayOfWeek] != "*" { return defaultFullSnapMaxTimeWindow * 7 - } else if schedule[dayOfMonth] == "*" && schedule[dayOfWeek] == "*" && strings.Contains(schedule[hour], "/") { + } + + if schedule[dayOfMonth] == "*" && schedule[dayOfWeek] == "*" && strings.Contains(schedule[hour], "/") { if timeWindow, err := strconv.ParseFloat(schedule[hour][strings.Index(schedule[hour], "/")+1:], 64); err == nil { return timeWindow }