cron

package
v0.0.0-...-73eff08 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cron

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

func New

func New() *Cron

New 新建一个Cron

func (*Cron) MustAdd

func (c *Cron) MustAdd(spec string, cmd func())

MustAdd 新增一个定时任务

func (*Cron) Start

func (c *Cron) Start()

Start 开始所有任务(可重入)

func (*Cron) Stop

func (c *Cron) Stop()

Stop 停止所有任务(可重入)

Jump to

Keyboard shortcuts

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