Skip to content

Commit 83c166c

Browse files
committed
Fixed earliest time logic in getNextSchedule for ScheduledScans
Signed-off-by: Ilyes Ben Dlala <ilyes.bendlala@iteratec.com>
1 parent 82114a1 commit 83c166c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎operator/controllers/execution/scheduledscan_controller.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,9 @@ func getNextSchedule(scheduledScan executionv1.ScheduledScan, now time.Time) (ne
180180
earliestTime = scheduledScan.ObjectMeta.CreationTimestamp.Time
181181
}
182182
if earliestTime.After(now) {
183-
tmp := sched.Next(now)
184-
return tmp, nil
183+
return sched.Next(now), nil
185184
}
185+
return sched.Next(earliestTime), nil
186186
}
187187
if scheduledScan.Spec.Interval.Duration > 0 {
188188
var nextSchedule time.Time

0 commit comments

Comments
 (0)