Documentation ¶
Overview ¶
scheduler 的默认精度为秒
callback() 不会出现并发! 当 callback() 处理时常超过 duration 时,抛出一条警告日志,并放弃本次 callback() 的执行
记得调用 scheduler.Start()
Index ¶
- func CronForever(name string, startAt int64, duration int64, callback func())
- func CronOnce(name string, startAt int64, callback func())
- func CronSpecific(name string, startAt int64, duration int64, times int32, callback func())
- func Delete(isDelete func(name string) bool)
- func Forever(name string, duration int64, callback func())
- func Now() int64
- func NowFakeClear()
- func NowFakeSet(ts int64)
- func Once(name string, after int64, callback func())
- func Specific(name string, duration int64, times int32, callback func())
- func Start()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CronForever ¶
startAt 第一次执行时间
func CronSpecific ¶
startAt 第一次执行时间
func NowFakeClear ¶
func NowFakeClear()
func NowFakeSet ¶
func NowFakeSet(ts int64)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.