cron

package
v0.0.73 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2018 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartCron added in v0.0.5

func StartCron(quit chan bool, rp *redis.Pool, name string, interval time.Duration, cronFunc Function)

StartCron calls the passed in function every minute, making sure it acquires a lock so that only one process is running at once. Note that across processes crons may be called more often than duration as there is no inter-process coordination of cron fires. (this might be a worthy addition)

Types

type Function

type Function func(lockName string, lockValue string) error

Function is the function that will be called on our schedule

Jump to

Keyboard shortcuts

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