zcron.go 256 Bytes
Newer Older
Vladimir Barsukov's avatar
Vladimir Barsukov committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package zcron

import (
	"github.com/go-co-op/gocron"
	"time"
)

func New(loc *time.Location) *gocron.Scheduler {
	return gocron.NewScheduler(loc)
}

func Default() *gocron.Scheduler {
	s := gocron.NewScheduler(time.UTC)
	s.SingletonModeAll()

	return s
}