mirror of
https://github.com/offen/docker-volume-backup.git
synced 2024-11-14 02:25:49 +01:00
Log when running schedule
This commit is contained in:
parent
cb31554791
commit
abfeb93628
@ -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,
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user