Documentation
¶
Overview ¶
Package cron contains functionality for executing code in a recurring fashion.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JobFunc ¶
JobFunc contains the payload function that will be run from Task. The int return value may or may not reflect on any error situations.
type Task ¶
type Task struct {
// contains filtered or unexported fields
}
Task allows executing functions in recurring points in time, depending on the system time. Considering container restarts or pod kills, this behavior is more flexible than a regular time ticker.
func New ¶
New creates a new instance for executing the same task. The task must be provided to its Run() function.
func (*Task) Run ¶
func (t *Task) Run()
Run executes the given function. It can be stopped with Stop(). Please note that Run() does not return an error.
Click to show internal directories.
Click to hide internal directories.