diff --git a/main.go b/main.go index d63d008..2785e32 100644 --- a/main.go +++ b/main.go @@ -65,13 +65,11 @@ func executeJob(t time.Time, job jobconfig, c config) { if err != nil { log.Err(err).Msg("Error while Execute command") } - nc := notificationConfig{} for _, n := range c.Notification { if n.Name == job.Notification { - nc = n + sendNotification(result, n) } } - sendNotification(result, nc) } func sendNotification(result jobResult, notification notificationConfig) error {