diff --git a/scheduler.go b/scheduler.go index a355993..41930f6 100644 --- a/scheduler.go +++ b/scheduler.go @@ -115,9 +115,9 @@ func ScheduleAndRunJobs(jobs []Job) error { defer func() { ctx := scheduler.Stop() <-ctx.Done() - }() - fmt.Println("All jobs successfully stopped") + fmt.Println("All jobs successfully stopped") + }() return nil }