Documentation
¶
Index ¶
Constants ¶
View Source
const ( Start = 1 Stop = 2 Pause = 3 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TaskQueue ¶
type TaskQueue struct {
// contains filtered or unexported fields
}
func NewTaskQueue ¶
func NewTaskQueue() *TaskQueue
func (*TaskQueue) RemoveTask ¶
type Timer ¶
type Timer interface { AddTaskByFunc(taskName string, spec string, task func(), option ...cron.Option) (cron.EntryID, error) AddTaskByJob(taskName string, spec string, job interface{ Run() }, option ...cron.Option) (cron.EntryID, error) FindCron(taskName string) (*cron.Cron, bool) StartTask(taskName string) StopTask(taskName string) Remove(taskName string, id int) Clear(taskName string) Close() }
使用说明 https://pkg.go.dev/github.com/robfig/cron
func NewTimerTask ¶
func NewTimerTask() Timer
Click to show internal directories.
Click to hide internal directories.