Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSchedule ¶
func NewSchedule() (gone.Goner, gone.GonerId, gone.GonerOption, gone.GonerOption)
Types ¶
type RunFuncOnceAt ¶
RunFuncOnceAt 定时跑 @Param fn 要调用的函数 @Param spec 调用时间 cron tab 格式 ┌───────────── second (0 - 59) │ ┌───────────── minute (0 - 59) │ │ ┌───────────── hour (0 - 23) │ │ │ ┌───────────── day of the month (1 - 31) │ │ │ │ ┌───────────── month (1 - 12) │ │ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday; │ │ │ │ │ │ 7 is also Sunday on some systems) │ │ │ │ │ │ │ │ │ │ │ │ * * * * * * @Param lockKey 分布式锁的key @Param lockTtl 锁定时长
type Scheduler ¶
type Scheduler interface { //Cron use: Cron(run facility.RunFuncOnceAt) Cron(run RunFuncOnceAt) }
Click to show internal directories.
Click to hide internal directories.