cron

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2019 License: MIT, MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

type Cron

type Cron struct {
	StartTime time.Time
	Uptime    time.Duration
	// contains filtered or unexported fields
}

func NewCron

func NewCron() *Cron

func (*Cron) NewTask

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

func (*Cron) RemoveTask

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

func (*Cron) Run

func (c *Cron) Run() *Cron

func (*Cron) Stop

func (c *Cron) Stop() *Cron

type Task

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

func (*Task) Disable

func (t *Task) Disable() *Task

func (*Task) Enable

func (t *Task) Enable() *Task

func (*Task) Enabled

func (t *Task) Enabled() bool

func (*Task) GetTime

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

func (*Task) Run

func (t *Task) Run()

func (*Task) SetTime

func (t *Task) SetTime(time string)

type Timer

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

Jump to

Keyboard shortcuts

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