This commit is contained in:
yoan
2024-08-21 12:19:12 +08:00
commit 50fa238d88
89 changed files with 11835 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
package app
import (
"sync"
"github.com/pocketbase/pocketbase/tools/cron"
)
var schedulerOnce sync.Once
var scheduler *cron.Cron
func GetScheduler() *cron.Cron {
schedulerOnce.Do(func() {
scheduler = cron.New()
})
return scheduler
}