cron

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cron added in v0.0.4

type Cron struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*Cron) AddFunc added in v0.0.4

func (c *Cron) AddFunc(name, spec string, task func()) (cron.EntryID, error)

添加函数任务

func (*Cron) AddJob added in v0.0.4

func (c *Cron) AddJob(name, spec string, job interface{ Run() }) (cron.EntryID, error)

添加job任务

func (*Cron) Clear added in v0.0.4

func (c *Cron) Clear(name string)

清空任务

func (*Cron) Close added in v0.0.4

func (c *Cron) Close()

关闭所有任务

func (*Cron) Find added in v0.0.4

func (c *Cron) Find(name string) (*cron.Cron, bool)

查找任务

func (*Cron) Remove added in v0.0.4

func (c *Cron) Remove(name string, id cron.EntryID)

移除任务里的子任务

func (*Cron) Start added in v0.0.4

func (c *Cron) Start(name string)

开启任务

func (*Cron) Stop added in v0.0.4

func (c *Cron) Stop(name string)

停止任务

type CronServiceProvider

type CronServiceProvider struct {
	*support.ServiceProvider
}

func (*CronServiceProvider) Register

func (c *CronServiceProvider) Register()

Jump to

Keyboard shortcuts

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