Add Cron interval to config
This commit is contained in:
parent
f52fe6abf3
commit
52dbfbf56e
6 changed files with 21 additions and 6 deletions
|
|
@ -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
|
||||
}()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue