diff --git a/scheduler.go b/scheduler.go index 33ef385e..9540003f 100644 --- a/scheduler.go +++ b/scheduler.go @@ -617,13 +617,8 @@ func (s *scheduler) addOrUpdateJob(id uuid.UUID, definition JobDefinition, taskW case <-s.shutdownCtx.Done(): } - return &job{ - id: j.id, - name: j.name, - tags: slices.Clone(j.tags), - jobOutRequest: s.jobOutRequestCh, - runJobRequest: s.runJobRequestCh, - }, nil + out := s.jobFromInternalJob(j) + return &out, nil } func (s *scheduler) RemoveByTags(tags ...string) {