From abfeb936280de79a8037d3adcf48ebec676a76e0 Mon Sep 17 00:00:00 2001 From: Frederik Ring Date: Wed, 7 Feb 2024 21:39:18 +0100 Subject: [PATCH] Log when running schedule --- cmd/backup/main.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmd/backup/main.go b/cmd/backup/main.go index 52dcf53..a7b8e46 100644 --- a/cmd/backup/main.go +++ b/cmd/backup/main.go @@ -133,10 +133,16 @@ func (c *command) runInForeground() error { addJob := func(config *Config) error { if _, err := cr.AddFunc(config.BackupCronExpression, func() { + c.logger.Info( + fmt.Sprintf( + "Now running schedule %s", + config.BackupCronExpression, + ), + ) if err := runScript(config); err != nil { c.logger.Error( fmt.Sprintf( - "Unexpected error running schedule %v: %v", + "Unexpected error running schedule %s: %v", config.BackupCronExpression, err, ),