Skip to content

Commit

Permalink
added the cronjob as a cronjob
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Oct 22, 2023
1 parent c93a1af commit 6c30fbf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions server/backend/cron/cronjobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -74,6 +74,7 @@ func (c *CronService) Run() error {
NewExamResultsHook,
MovieType,
FeedbackEmail,
AlarmType,
).
Scan(&res)

Expand Down Expand Up @@ -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() })
}
}

Expand Down

0 comments on commit 6c30fbf

Please sign in to comment.