Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DEBUG = (os.Getenv("D") == "1")
check if the debug flag is set
Functions ¶
func RegisterTask ¶
func RegisterTask(t Task)
Register a single task in the scheduler and the registered Task array.
Types ¶
type Task ¶
type Task struct { Name string Slug string Interval time.Duration Function func(*TaskContext) // contains filtered or unexported fields }
Register the general task informations.
type TaskContext ¶
The context a execution is runnung in
func (*TaskContext) Debug ¶
func (c *TaskContext) Debug(message string, v ...interface{})
Alias the debug function
func (*TaskContext) Err ¶
func (c *TaskContext) Err(message string, v ...interface{})
Alias the error function
func (*TaskContext) Info ¶
func (c *TaskContext) Info(message string, v ...interface{})
Alias the info function
func (*TaskContext) TaskSlug ¶
func (c *TaskContext) TaskSlug() string
Create a lower case, non special symbol, no space string
func (*TaskContext) Warn ¶
func (c *TaskContext) Warn(message string, v ...interface{})
Alias the warning function
Click to show internal directories.
Click to hide internal directories.