service

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisableTask

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

DisableTask 禁用任务

func EnableTask

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

EnableTask 启用任务

Types

type TaskInfoService

type TaskInfoService struct {
	*dzhCore.Service
}

func NewTaskInfoService

func NewTaskInfoService() *TaskInfoService

func (*TaskInfoService) Log

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

Log 获取任务日志

func (*TaskInfoService) ModifyAfter

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

func (*TaskInfoService) Once

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

Once 执行一次任务

func (*TaskInfoService) Record

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

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

func (*TaskInfoService) SetNextRunTime

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