Documentation ¶
Index ¶
- Variables
- func SendNotification(Job model.VCron, TaskResult model.TaskResult)
- type Handler
- type VCron
- func (c VCron) AddJobToSchedule(Job model.VCron) (err error)
- func (c VCron) AfterExecJob(Job model.VCron, TaskResult model.TaskResult, Taskid int64)
- func (c VCron) BeforeExecJob(Job model.VCron) (taskLogId int64)
- func (c VCron) CreateJob(Job model.VCron) cron.FuncJob
- func (c VCron) CronWithNoSeconds() cron.Option
- func (c VCron) DoTaskTimeOut(Job model.VCron, TaskId int64) (s int64, e string)
- func (c VCron) ExecJob(Job model.VCron, TaskId int64) model.TaskResult
- func (c VCron) GetDispacherRedisLock(Job model.VCron) bool
- func (c VCron) GetNextQueryTime(Rule string) int64
- func (c VCron) IsLastTaskRunning(Job model.VCron) bool
- func (c VCron) ReleaseLock(Jobid int64)
- func (c VCron) Start()
Constants ¶
This section is empty.
Variables ¶
View Source
var Mycron *cron.Cron
定时任务调度管理器
Functions ¶
func SendNotification ¶
func SendNotification(Job model.VCron, TaskResult model.TaskResult)
发送任务结果通知
Types ¶
type VCron ¶
type VCron struct{}
func (VCron) AfterExecJob ¶
任务执行后置操作
func (VCron) DoTaskTimeOut ¶
超时处理
func (VCron) GetDispacherRedisLock ¶
防并发锁
func (VCron) GetNextQueryTime ¶
根据rule规则获取下一次执行时间
func (VCron) IsLastTaskRunning ¶
当前job是否已经有作业在运行
Click to show internal directories.
Click to hide internal directories.