scheduler

package
v0.7.6-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scheduler

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

Scheduler is a cron wrapper that manages tasks

func New

func New(tasks []*Task) (*Scheduler, error)

New returns new *Scheduler

func (*Scheduler) Run

func (s *Scheduler) Run()

Run starts scheduler to do the tasks

type Task

type Task struct {
	CronTab string
	Func    func() error
}

Task defines a particular job needs to be done by the scheduler

Jump to

Keyboard shortcuts

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