cron

package
v0.0.0-...-f7e4026 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package cron implements interfaces schedule.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(logOut io.Writer) schedule.Scheduler

New - constructor Scheduler.

Types

type Scheduler

type Scheduler struct {
	*Cron.Cron
}

Scheduler defines the structure implements interfaces schedule. Using structure methods without initialization with the New constructor will lead to panic.

func (*Scheduler) AddTask

func (s *Scheduler) AddTask(spec string, cmd func()) error

AddTask - adds an executable task to the scheduler.

func (*Scheduler) Reset

func (s *Scheduler) Reset()

Reset - resets the scheduler, making it again available without any tasks on it.

Jump to

Keyboard shortcuts

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