From 10e50393607d71b43f9562d480a5b16a1e2508c9 Mon Sep 17 00:00:00 2001 From: Xevion Date: Wed, 25 Sep 2024 10:12:19 -0500 Subject: [PATCH] remove immediate run func from cron --- cmd/cron/main.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/cmd/cron/main.go b/cmd/cron/main.go index 5aa8848..e93b821 100644 --- a/cmd/cron/main.go +++ b/cmd/cron/main.go @@ -93,16 +93,6 @@ func main() { durationUntilNextRun := time.Until(nextRun).Seconds() fmt.Printf("startup: next run in %.2f seconds: %v\n", durationUntilNextRun, nextRun.Format(time.RFC3339)) - if durationUntilNextRun > 60 { - // Run the job immediately - err = j.RunNow() - fmt.Println("startup: running job immediately") - if err != nil { - fmt.Println("Error running job immediately:", err) - os.Exit(1) - } - } - // Setup signal handler channel stop := make(chan os.Signal, 1) signal.Notify(stop, os.Interrupt) // Ctrl+C signal