schedule

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSchedule

func NewSchedule() (gone.Goner, gone.GonerId, gone.GonerOption)

func Priest

func Priest(cemetery gone.Cemetery) error

Types

type JobName

type JobName string

type RunFuncOnceAt

type RunFuncOnceAt func(spec string, jobName JobName, fn func())

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 Schedule

type Schedule interface {
	Start() error
	Stop() error
}

type Scheduler

type Scheduler interface {

	//Cron use: Cron(run facility.RunFuncOnceAt)
	Cron(run RunFuncOnceAt)
}

Jump to

Keyboard shortcuts

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