timer
This commit is contained in:
parent
c4570ee30b
commit
f6d0700068
|
@ -16,14 +16,14 @@ func Init1() error {
|
|||
func Init() error {
|
||||
timezone, _ := time.LoadLocation("Asia/Shanghai")
|
||||
cron := gocron.NewScheduler(timezone)
|
||||
cron.Every(5).Minute().Do(func() {
|
||||
cron.Every(10).Minute().Do(func() {
|
||||
go SyncCheckin(time.Now().Format("2006-01-02"))
|
||||
})
|
||||
|
||||
cron.Every(1).Day().At("03:00").Do(func() {
|
||||
go SyncStaffInfo()
|
||||
})
|
||||
cron.Every(1).Month(1, 2, 3, 4, 5).At("02:00").Do(func() {
|
||||
cron.Every(1).Month(1, 2, 3, 4, 5, 6, 7, 8, 9, 10).At("02:00").Do(func() {
|
||||
go SyncStaffSalary("")
|
||||
})
|
||||
cron.StartAsync()
|
||||
|
|
Loading…
Reference in New Issue