service

package
v1.5.11 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisableTask added in v0.2.1

func DisableTask(ctx g.Ctx, cronId string) (err error)

DisableTask 禁用任务

func EnableTask added in v0.2.1

func EnableTask(ctx g.Ctx, cronId string, funcstring string, cron string, startDate string) (err error)

EnableTask 启用任务

Types

type TaskInfoService

type TaskInfoService struct {
	*cool.Service
}

func NewTaskInfoService

func NewTaskInfoService() *TaskInfoService

func (*TaskInfoService) Log added in v0.2.1

func (s *TaskInfoService) Log(ctx g.Ctx, param g.MapStrStr) (data interface{}, err error)

Log 获取任务日志

func (*TaskInfoService) ModifyAfter added in v0.2.1

func (s *TaskInfoService) ModifyAfter(ctx g.Ctx, method string, param g.MapStrAny) (err error)

func (*TaskInfoService) Once added in v0.2.1

func (s *TaskInfoService) Once(ctx g.Ctx, id int64) error

Once 执行一次任务

func (*TaskInfoService) Record added in v0.2.1

func (s *TaskInfoService) Record(ctx g.Ctx, id string, status int, detail string) error

Record 保存任务记录,成功任务每个任务保留最新20条日志,失败日志不会删除

func (*TaskInfoService) SetNextRunTime added in v0.3.2

func (s *TaskInfoService) SetNextRunTime(ctx g.Ctx, cronId string, cron string) error

SetNextRunTime 更新下次执行时间

Jump to

Keyboard shortcuts

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