Skip to content

Commit

Permalink
chore: improve error message when failing to schedule a job
Browse files Browse the repository at this point in the history
  • Loading branch information
moshloop committed Nov 5, 2023
1 parent c9a30a8 commit a212d15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion job/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit a212d15

Please sign in to comment.