cron

package
v0.0.0-...-4dc1fac Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ECronStatusInit eCronStaus
	ECronStatusWaitStart
	ECronStatusStart
	ECronStatusRunning
	ECronStatusWaitStop
	ECronStatusStop
)

Variables

View Source
var (
	ErrTaskAlreadyExist = errors.New("Task Already Exist")
)

Functions

This section is empty.

Types

type Cron

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

func NewCron

func NewCron() *Cron

func (*Cron) AddFunc

func (c *Cron) AddFunc(taskName string, duration time.Duration, f TaskFunc) error

当前版本,必须在 开始之前执行

func (*Cron) Start

func (c *Cron) Start() error

func (*Cron) Stop

func (c *Cron) Stop() error

type TaskFunc

type TaskFunc func()

Jump to

Keyboard shortcuts

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