goworld: github.com/xiaonanln/goworld/engine/crontab Index | Files

package crontab

import "github.com/xiaonanln/goworld/engine/crontab"

Index

Package Files

crontab.go

func Initialize Uses

func Initialize()

Initialize crontab module, called by engine

type Handle Uses

type Handle int

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

func Register Uses

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 Uses

func (h Handle) Unregister()

Unregister a registered crontab handle

Package crontab imports 4 packages (graph) and is imported by 1 packages. Updated 2017-08-26. Refresh now. Tools for package owners.