Documentation
¶
Overview ¶
Package task provides interval-based task scheduling functionality.
Deprecated: Use cronjob package instead for more flexible cron-based scheduling. The cronjob package supports cron expressions and provides better control over task execution.
Index ¶
- func Init() errordeprecated
- func Register(fn func() error, interval time.Duration, name string)deprecated
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register
deprecated
Register registers a task with the given function, interval, and name. The task can be registered at any point before or after Init().
Deprecated: Use cronjob.Register() instead for more flexible cron-based scheduling. Example migration:
// Old: task.Register(fn, 5*time.Minute, "my-task") // New: cronjob.Register(fn, "0 */5 * * * *", "my-task")
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.