job

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	StatusChan chan int
)

Functions

func RedisMqProduce

func RedisMqProduce(ctx context.Context, opt ...string) error

Types

type Channel

type Channel struct {
	// contains filtered or unexported fields
}

type CustomJob

type CustomJob struct {
	// contains filtered or unexported fields
}

type CustomJobHandler

type CustomJobHandler func(ctx context.Context, opt ...string) error

type Job

type Job struct {
	ScheduleList  []*Schedule
	CustomJobList []*CustomJob
	StableJobList []*StableJob
	// contains filtered or unexported fields
}

func NewJob

func NewJob(ctx context.Context) *Job

func (*Job) CrontabStatusWatcher

func (j *Job) CrontabStatusWatcher()

func (*Job) GetChannel

func (j *Job) GetChannel() *Channel

GetChannel 返回注册的Channel

func (*Job) PrintCustomJobList

func (j *Job) PrintCustomJobList()

PrintCustomJobList 打印可执行的用户任务

func (*Job) RegisterChannel

func (j *Job) RegisterChannel() *Job

func (*Job) RegisterCrontab

func (j *Job) RegisterCrontab() *Job

RegisterCrontab 注册定时任务 验证工具:http://www.jsons.cn/quartzcheck/

func (*Job) RegisterCustomJobs

func (j *Job) RegisterCustomJobs() *Job

RegisterCustomJobs 注册用户命令行执行的方法

func (*Job) RegisterStableJobs

func (j *Job) RegisterStableJobs() *Job

RegisterStableJobs 注册常驻命令执行的方法

func (*Job) RunCustomJob

func (j *Job) RunCustomJob(ctx context.Context, wg *sync.WaitGroup, name string, params []string) error

RunCustomJob 执行用户任务

func (*Job) Start

func (j *Job) Start() *Job

Start 启动定时任务

func (*Job) StartStableJob

func (j *Job) StartStableJob() *Job

func (*Job) Stop

func (j *Job) Stop()

func (*Job) StopStableJob

func (j *Job) StopStableJob()

type Schedule

type Schedule struct {
	// contains filtered or unexported fields
}

type ScheduleHandler

type ScheduleHandler func()

type StableJob

type StableJob struct {
	// contains filtered or unexported fields
}

type StableJobHandler

type StableJobHandler func(ctx context.Context) error

Jump to

Keyboard shortcuts

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