package scheduler import ( "database/sql" "time" "git.simponic.xyz/simponic/backup-notify/database" "github.com/go-co-op/gocron" ) func StartScheduler(dbConn *sql.DB) { scheduler := gocron.NewScheduler(time.Local) scheduler.Every(1).Hour().Do(func() { database.DeleteOldBackups(dbConn, 31) }) scheduler.StartAsync() }