Documentation
¶
Index ¶
Constants ¶
View Source
const ( RunningStatusCreated = 0 RunningStatusExecuted = 1 )
View Source
const ( Active = 10 // 系统状态:激活 Inactive = 20 // 系统状态:未激活 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OtterBatchRunningTask ¶
type OtterBatchRunningTask struct {
app.Pk
JobId string `orm:"column(job_id)"` // 任务ID
ClientId string `orm:"column(client_id)"` // 任务应用、任务模块
ExecutorHandler string `orm:"column(executor_handler)"` // 任务标识。如“HelloWorld”
Params string `orm:"column(params);null"` // 任务动态参数,json格式
app.TableChangeInfo
}
OtterBatchRunningTask 运行中任务
type OtterBatchTask ¶
type OtterBatchTask struct {
app.Pk
ClientId string `orm:"column(client_id);null"` // 任务应用、任务模块
JobID string `orm:"column(job_id);unique"` // 任务ID。自动生成
Name string `orm:"column(name);null"` // 任务名称
ExecutorHandler string `orm:"column(executor_handler)"` // 任务标识。如“HelloWorld”
Spec string `orm:"column(spec);null"` // cron表达式
PrevTime time.Time `orm:"column(prev_time);type(datetime);null"` // 上次执行时间
NextTime time.Time `orm:"column(next_time);type(datetime);null"` // 下次执行时间
MaxInstanceNum int `orm:"column(max_instance_num);default(10)"` // 最大可执行实例限制
app.TableChangeInfo
}
OtterBatchTask 定时任务管理
func (*OtterBatchTask) TableUnique ¶ added in v0.0.3
func (t *OtterBatchTask) TableUnique() [][]string
type OtterBatchTaskLog ¶
type OtterBatchTaskLog struct {
app.Pk
ClientId string `orm:"column(client_id);"` // 任务应用、任务模块
JobId string `orm:"column(job_id);null"` // 任务ID
Name string `orm:"column(name);null"` // 任务名称
ExecutorHandler string `orm:"column(executor_handler);null"` // 任务标识。如“HelloWorld”
PrevTime time.Time `orm:"column(prev_time);type(datetime);null"` // 上次执行时间
NextTime time.Time `orm:"column(next_time);type(datetime);null"` // 下次执行时间
Result int `orm:"column(result);null"` // 执行结果
Msg string `orm:"column(msg);null"` // 错误信息
app.TableInfo
}
OtterBatchTaskLog 任务日志
type TableTimeYM ¶
type TableTimeYMD ¶
type TableTimeYMDHMS ¶
Click to show internal directories.
Click to hide internal directories.