scheduler

package
v0.0.127 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

scheduler 的默认精度为秒

callback() 不会出现并发! 当 callback() 处理时常超过 duration 时,抛出一条警告日志,并放弃本次 callback() 的执行

记得调用 scheduler.Start()

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CronForever

func CronForever(name string, startAt int64, duration int64, callback func())

startAt 第一次执行时间

func CronOnce

func CronOnce(name string, startAt int64, callback func())

func CronSpecific

func CronSpecific(name string, startAt int64, duration int64, times int32, callback func())

startAt 第一次执行时间

func Delete added in v0.0.121

func Delete(isDelete func(name string) bool)

func Forever

func Forever(name string, duration int64, callback func())

func Now

func Now() int64

func NowFakeClear

func NowFakeClear()

func NowFakeSet

func NowFakeSet(ts int64)

func Once

func Once(name string, after int64, callback func())

func Specific

func Specific(name string, duration int64, times int32, callback func())

func Start

func Start()

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL