start
This commit is contained in:
parent
810da6a9af
commit
f2db7ceacf
|
@ -4,6 +4,7 @@ type Checkin struct {
|
|||
Id int64
|
||||
UserId string
|
||||
Day string
|
||||
Exception string
|
||||
StartTime int64
|
||||
EndTime int64
|
||||
CreateTime int64
|
||||
|
|
|
@ -8,8 +8,10 @@ import (
|
|||
func Init() error {
|
||||
timezone, _ := time.LoadLocation("Asia/Shanghai")
|
||||
cron := gocron.NewScheduler(timezone)
|
||||
cron.Every(10).Minute().Do(func() {
|
||||
cron.Every(5).Minute().Do(func() {
|
||||
go SyncCheckin(time.Now().Format("2006-01-02"))
|
||||
})
|
||||
|
||||
cron.StartAsync()
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue