diff --git a/main.go b/main.go index d5c3af2..15d52e5 100644 --- a/main.go +++ b/main.go @@ -146,7 +146,10 @@ func (web *Web) initCronJobs() { } if viper.IsSet("database.prune") { pruneSchedule := viper.GetString("database.prune") - web.cron.AddFunc(pruneSchedule, web.pruneDB) + _, err := web.cron.AddFunc(pruneSchedule, web.pruneDB) + if err != nil { + log.Fatalln("Could not parse database.prune:", pruneSchedule) + } log.Println("Started DB prune cronjob:", pruneSchedule) } web.cron.Start() diff --git a/todo.md b/todo.md index 111f9e9..ae94578 100644 --- a/todo.md +++ b/todo.md @@ -11,8 +11,6 @@ - log things to db for cron runs - comments - set default value for database.dns -- proper handling of errors in prune schedule -- add