cron

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFunc

func AddFunc(spec string, cmd func()) (tcron.EntryID, error)

func OnInit

func OnInit(config map[string]interface{}, option ...Option) (err error)

func Remove

func Remove(id tcron.EntryID)

func Start

func Start()

func Stop

func Stop()

Types

type Cron

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

func (*Cron) AddFunc

func (this *Cron) AddFunc(spec string, cmd func()) (tcron.EntryID, error)

func (*Cron) Remove

func (this *Cron) Remove(id tcron.EntryID)

func (*Cron) Start

func (this *Cron) Start()

func (*Cron) Stop

func (this *Cron) Stop()

type Icron

type Icron interface {
	Start()
	Stop()
	AddFunc(spec string, cmd func()) (tcron.EntryID, error)
	Remove(id tcron.EntryID)
}

func NewSys

func NewSys(option ...Option) (sys Icron, err error)

type Option

type Option func(*Options)

type Options

type Options struct {
}

Jump to

Keyboard shortcuts

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