details improvement and unnecessary files deletion
This commit is contained in:
@@ -2,6 +2,7 @@ package app
|
||||
|
||||
import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/pocketbase/pocketbase/tools/cron"
|
||||
)
|
||||
@@ -13,6 +14,10 @@ var scheduler *cron.Cron
|
||||
func GetScheduler() *cron.Cron {
|
||||
schedulerOnce.Do(func() {
|
||||
scheduler = cron.New()
|
||||
location, err := time.LoadLocation("Asia/Shanghai")
|
||||
if err == nil {
|
||||
scheduler.SetTimezone(location)
|
||||
}
|
||||
})
|
||||
|
||||
return scheduler
|
||||
|
||||
Reference in New Issue
Block a user