Documentation ¶
Index ¶
Constants ¶
View Source
const TD = "@daily" // 每天0点执行
View Source
const TH = "@hourly" // 每1小时执行
View Source
const TM = "@monthly" // 每月第一天的0点执行
View Source
const TM0217 = "0 8 17,2 * *" // 每月2号和17号早上8点执行
View Source
const TM15 = "0 0 15 * *" // 每月15号0点执行
View Source
const TS = "@every 1s" // 每秒执行
View Source
const TW = "@weekly" // 每周日开始的那个0点
View Source
const Tm = "@every 60s" // 每分钟执行
Variables ¶
View Source
var JLog *log.Logger
View Source
var LogLevel = log.DebugLevel
View Source
var LogOnce sync.Once
View Source
var LogOut = os.Stdout
Functions ¶
func StartTimerTask ¶
func StartTimerTask(taskName, timeStr string, taskFunc func())
StartTimerTask 定时任务,添加log和异常处理
Types ¶
Click to show internal directories.
Click to hide internal directories.