From 9b17cde420c0e444294033845fc192df8c356a96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferdinand=20M=C3=BCtsch?= Date: Fri, 11 Oct 2019 09:16:42 +0200 Subject: [PATCH] Trigger summary generation on server startup. --- services/aggregation.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/aggregation.go b/services/aggregation.go index 58db77d..9158127 100644 --- a/services/aggregation.go +++ b/services/aggregation.go @@ -44,6 +44,9 @@ func (srv *AggregationService) Schedule() { go srv.persistWorker(summaries) } + // Run once initially + srv.trigger(jobs) + gocron.Every(1).Day().At("02:15").Do(srv.trigger, jobs) <-gocron.Start() }