Add Cron interval to config

This commit is contained in:
Tom Wiesing 2022-12-07 11:02:44 +01:00
parent f52fe6abf3
commit 52dbfbf56e
No known key found for this signature in database
6 changed files with 21 additions and 6 deletions

View file

@ -2,7 +2,6 @@ package cmd
import (
"net/http"
"time"
wisski_distillery "github.com/FAU-CDI/wisski-distillery"
"github.com/FAU-CDI/wisski-distillery/internal/cli"
@ -51,7 +50,7 @@ func (s server) Run(context wisski_distillery.Context) error {
// start the cron tasks
context.Printf("Starting cron tasks %s\n", s.Bind)
done := dis.Cron().Start(context.Context, time.Minute, notify)
done := dis.Cron().Start(context.Context, notify)
defer func() {
<-done
}()