scheduling

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ScheduleFunc

func ScheduleFunc(done <-chan int, expr string, fn func() error) error

ScheduleFunc takes a cron-like expression, and a callback function to execute on a schedule. It will run indefinitely, or until there is an error. If there is an error, it will be returned. This function is synchronous, and will block.

The `expr` parameter is the cron-like expression (we're using github.com/gorhill/cronexpr). The `quit` parameter is a channel that can be sent any int that will break the loop. The `fn` parameter is a callback function that will be called each scheduled interval.

Types

This section is empty.

Jump to

Keyboard shortcuts

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