Skip to content

Modern Docker Management, Designed for Everyone

fix(jobs): allow schedule updates for disabled jobs

Kyle Mendelle7317f026276
diff --git a/backend/internal/job/service.go b/backend/internal/job/service.go
index a078eed73..376f476b3 100644
--- a/backend/internal/job/service.go
+++ b/backend/internal/job/service.go
@@ -272,6 +272,9 @@ func (s *JobService) rescheduleAffectedJobInternal(ctx context.Context, jobID st
}
expectedSchedule := job.Schedule(rescheduleCtx)
+ if conditional, isConditional := job.(scheduler.ConditionalJob); isConditional && !conditional.ShouldSchedule(rescheduleCtx) {
+ expectedSchedule = ""
+ }
if runtimeState.Schedule != expectedSchedule {
return fmt.Errorf("job %s runtime schedule %q does not match requested schedule %q", jobID, runtimeState.Schedule, expectedSchedule)
}