diff --git a/plugins/host_scheduler.go b/plugins/host_scheduler.go index 71d2f5a08..8271d6465 100644 --- a/plugins/host_scheduler.go +++ b/plugins/host_scheduler.go @@ -72,7 +72,7 @@ func (s *schedulerServiceImpl) ScheduleOneTime(ctx context.Context, delaySeconds capturedID := scheduleID timer := timeAfterFunc(time.Duration(delaySeconds)*time.Second, func() { - s.invokeCallback(ctx, capturedID) + s.invokeCallback(context.Background(), capturedID) // Clean up the entry after firing s.mu.Lock() delete(s.schedules, capturedID) @@ -97,7 +97,7 @@ func (s *schedulerServiceImpl) ScheduleRecurring(ctx context.Context, cronExpres capturedID := scheduleID callback := func() { - s.invokeCallback(ctx, capturedID) + s.invokeCallback(context.Background(), capturedID) } s.mu.Lock()