timer

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParserCronOptions

func ParserCronOptions(str string) cron.Option

Types

type GVA_Timer

type GVA_Timer interface {
	Timer
	FindTaskList() map[string]*taskManager
	AddTaskByFuncWithSecond(taskName string, spec string, fun func(), Desc string, option ...cron.Option) (cron.EntryID, error)
	AddTaskByJobWithSeconds(taskName string, spec string, job interface{ Run() }, Desc string, option ...cron.Option) (cron.EntryID, error)
}

func NewTimerTask

func NewTimerTask() GVA_Timer

type Timer

type Timer interface {
	AddTaskByFunc(taskName string, spec string, task func(), Desc string, option ...cron.Option) (cron.EntryID, error)
	AddTaskByJob(taskName string, spec string, job interface{ Run() }, Desc string, option ...cron.Option) (cron.EntryID, error)
	FindCron(taskName string) (*taskManager, bool)
	StartTask(taskName string)
	StopTask(taskName string)
	Remove(taskName string, id int)
	Clear(taskName string)
	Close()
}

Jump to

Keyboard shortcuts

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