From a212d1562cfefb34d191276d0afc50052c097b3f Mon Sep 17 00:00:00 2001 From: Moshe Immermam Date: Sun, 5 Nov 2023 22:26:35 +0200 Subject: [PATCH] chore: improve error message when failing to schedule a job --- job/job.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/job/job.go b/job/job.go index f725cd2b..2daa6d67 100644 --- a/job/job.go +++ b/job/job.go @@ -76,7 +76,7 @@ func (j Job) Run() { func (j *Job) AddToScheduler(cronRunner *cron.Cron) error { entryID, err := cronRunner.AddJob(j.Schedule, j) if err != nil { - return fmt.Errorf("failed to schedule job: %s", j.Name) + return fmt.Errorf("failed to schedule job %s: %s", j.Name, err) } j.entryID = &entryID if j.RunNow {