cron_runner

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ITaskModel

type ITaskModel interface {
	GetId() string
	GetName() string
	GetSpec() string
}

type Server

type Server interface {
	Start()

	TaskCountWait()

	// Stop 停止 cron 服务
	Stop()

	// AddTask 增加定时任务
	AddTask(task ITaskModel)

	// RemoveTask 删除定时任务
	RemoveTask(taskId string)

	// AddJob 增加定时任务执行的工作内容
	AddJob(task ITaskModel) cron.FuncJob
	// contains filtered or unexported methods
}

singleton

func New

func New(logger *zap.Logger, cache cache.Cache) (Server, error)

Jump to

Keyboard shortcuts

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