crontab

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initialize

func Initialize()

Initialize crontab module, called by engine

Types

type Handle

type Handle int

Handle is the type of return value of Register, can be used to cancel the register

func Register

func Register(minute, hour, day, month, dayofweek int, cb func()) Handle

Register a callack which will be executed when time condition is satisfied

param minute: time condition satisfied on the specified minute, or every -minute if minute is negative param hour: time condition satisfied on the specified hour, or every -hour when hour is negative param day: time condition satisfied on the specified day, or every -day when day is negative param month: time condition satisfied on the specified month, or every -month when month is negative param dayofweek: time condition satisfied on the specified week day, or every -dayofweek when dayofweek is negative param cb: callback function to be executed when time is satisfied

func (Handle) Unregister

func (h Handle) Unregister()

Unregister a registered crontab handle

Jump to

Keyboard shortcuts

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