From 6c30fbfec3c17770bfd98472c91d692848fd3b08 Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Sun, 22 Oct 2023 02:08:46 +0200 Subject: [PATCH] added the cronjob as a cronjob --- server/backend/cron/cronjobs.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server/backend/cron/cronjobs.go b/server/backend/cron/cronjobs.go index 95ba45a2..dd371fcd 100644 --- a/server/backend/cron/cronjobs.go +++ b/server/backend/cron/cronjobs.go @@ -35,9 +35,9 @@ const ( NewExamResultsHook = "newExamResultsHook" MovieType = "movie" FeedbackEmail = "feedbackEmail" + AlarmType = "alarm" - /* MensaType = "mensa" - AlarmType = "alarm" */ + // MensaType = "mensa" ) func New(db *gorm.DB) *CronService { @@ -74,6 +74,7 @@ func (c *CronService) Run() error { NewExamResultsHook, MovieType, FeedbackEmail, + AlarmType, ). Scan(&res) @@ -131,6 +132,8 @@ func (c *CronService) Run() error { g.Go(func() error { return c.iosActivityReset() }) case FeedbackEmail: g.Go(func() error { return c.feedbackEmailCron() }) + case AlarmType: + g.Go(func() error { return c.alarmCron() }) } }