rexCrontabPool

package
v1.0.47 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddTask

func AddTask(uuidStr string, taskName, spec string, fn func(taskUuid, taskName string)) (taskUuid string, err error)

Types

type CrontabPool

type CrontabPool struct {
	*cron.Cron
	TaskPool   map[string]*Task
	Lock       sync.Mutex
	Register   chan *Task
	Update     chan *Task
	UnRegister chan string
	Close      chan int
	TaskCount  int
}

func NewCrontabPool

func NewCrontabPool() *CrontabPool

func (*CrontabPool) Run

func (c *CrontabPool) Run()

type PeriodicJob

type PeriodicJob struct {
	RequestClient rexRequest.RequestClient
	Data          PeriodicJobData
	// contains filtered or unexported fields
}

func (*PeriodicJob) Run

func (j *PeriodicJob) Run()

type PeriodicJobData

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

type Task

type Task struct {
	TaskUuid string // note: 最好用uuid
	Name     string
	Spec     string
	JobId    cron.EntryID
	Job      cron.Job
}

Jump to

Keyboard shortcuts

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