init - add project files

This commit is contained in:
2025-03-06 23:54:11 -05:00
commit e724ff1120
1363 changed files with 897467 additions and 0 deletions

27
tasks/example_tasks.go Normal file
View File

@@ -0,0 +1,27 @@
package tasks
import (
"log"
"github.com/go-co-op/gocron/v2"
)
var Scheduler gocron.Scheduler
func Init() {
var err error
Scheduler, err := gocron.NewScheduler()
if err != nil {
log.Println("Error scheduling tasks")
}
Scheduler.Start()
}
func ShutdownTasks() {
err := Scheduler.Shutdown()
if err != nil {
log.Println("Error stopping task scheduler")
}
}