gone_schedule

package module
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: AGPL-3.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const ScheduleId = "gone-schedule"

Variables

This section is empty.

Functions

This section is empty.

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(manager std.ComponentManager) error
}

func NewSchedule

func NewSchedule() (Schedule, string)

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