cc-backend/internal/taskManager/footprintService.go

26 lines
630 B
Go
Raw Normal View History

// Copyright (C) NHR@FAU, University Erlangen-Nuremberg.
// All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package taskManager
2024-08-29 08:45:04 +02:00
import (
"time"
"github.com/ClusterCockpit/cc-backend/pkg/log"
"github.com/go-co-op/gocron/v2"
)
func registerFootprintWorker() {
2024-08-29 08:45:04 +02:00
log.Info("Register Footprint Update service")
d, _ := time.ParseDuration("10m")
s.NewJob(gocron.DurationJob(d),
gocron.NewTask(
func() {
t := time.Now()
log.Printf("Update Footprints started at %s", t.Format(time.RFC3339))
log.Print("Update Footprints done")
}))
}