cron

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SECOND ...
	SECOND int = iota
	// MINUTE ...
	MINUTE
	// HOUR ...
	HOUR
	// DAY ...
	DAY
	// MONTH ...
	MONTH
	// WEEKDAY ...
	WEEKDAY
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Cron

type Cron struct {
	sync.Mutex

	StartTime time.Time
	Uptime    time.Duration
	// contains filtered or unexported fields
}

Cron ...

func NewCron

func NewCron() *Cron

NewCron ...

func (*Cron) NewTask

func (c *Cron) NewTask(t string, h func()) (*Task, error)

NewTask ...

func (*Cron) RemoveTask

func (c *Cron) RemoveTask(task *Task)

RemoveTask ...

func (*Cron) Run

func (c *Cron) Run() *Cron

Run ...

func (*Cron) Stop

func (c *Cron) Stop() *Cron

Stop ...

type Task

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

Task ...

func (*Task) Disable

func (t *Task) Disable() *Task

Disable ...

func (*Task) Enable

func (t *Task) Enable() *Task

Enable ...

func (*Task) Enabled

func (t *Task) Enabled() bool

Enabled ...

func (*Task) GetTime

func (t *Task) GetTime() (time string)

GetTime ...

func (*Task) Run

func (t *Task) Run()

Run ...

func (*Task) SetTime

func (t *Task) SetTime(time string)

SetTime ...

type Timer

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

Timer ...

Jump to

Keyboard shortcuts

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