Documentation
¶
Index ¶
- func AddThenStart(task ScheduleTask, spec string, runImmediately bool)
- func AddTimerThenStart(task ScheduleTask, t time.Duration, asyncTask, runImmediately bool)
- func GetTaskModel(taskId int64) (any, bool)
- func IsExist(id int64) bool
- func Remove(id int64)
- func ResetCron(id int64, spec string) error
- func ResetTimer(id int64, tm time.Duration, asyncTask bool) error
- func Stop(id int64)
- type BaseTask
- type ScheduleTask
- type TimerTask
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddThenStart ¶
func AddThenStart(task ScheduleTask, spec string, runImmediately bool)
func AddTimerThenStart ¶ added in v1.0.8
func AddTimerThenStart(task ScheduleTask, t time.Duration, asyncTask, runImmediately bool)
func GetTaskModel ¶ added in v1.0.9
Types ¶
type ScheduleTask ¶
type ScheduleTask interface { ID() int64 Cmd() func() }
func NewDiskLogCls ¶ added in v1.0.11
func NewDiskLogCls(id int, maxLogSizeMB int) ScheduleTask
func NewMysqlDBBackup ¶ added in v1.0.11
func NewMysqlDBBackup(id int, dbUser, dbPass, dbName, backupPath, dockerName string, isSudo bool) ScheduleTask
type TimerTask ¶ added in v1.0.8
func NewTimerTask ¶ added in v1.0.8
func NewTimerTask(duration time.Duration, t ScheduleTask) *TimerTask
Click to show internal directories.
Click to hide internal directories.