URL:http://develop.persagy.com/job-admin/customGroup/save
Method:POST
Header:Content-Type=application/json
请求:
{
"id":1, // ID,
"appname":"", // 名称,必填
"title": "测试", // 标题,必填
"addressType":0, // 执行器地址类型:0=自动注册、1=手动录入
"addressList":"DO_NOTHING" //执行器地址列表
}
返回:
{
"code":200, // 成功
"content":"1" // 执行器ID
}
URL:http://develop.persagy.com/job-admin/customInfo/addOrUpdate2Start
Method:POST
Header:Content-Type=application/json
请求:
{
"id":1, // 任务ID,存在更新,不存在新增
"jobGroup": 1, // 执行器主键ID,必填
"childJobId":"", // 子级任务ID,选填
"jobDesc": "测试", // 任务描述,必填
"scheduleConf":"0/20 * * * * ?", //cron表达式,或者时间间隔单位:S,根据 scheduleType 来,必填
"scheduleType": "CRON", //调度类型,根据字典值来,必填
"author":"测试人员", // 负责人,必填
"executorParam":{ // 任务参数,必填
"test":"123",
"callBackUrl":"http://www.baidu.com" // 回调地址,必填
},
"executorRouteStrategy":"ROUND", //路由策略,来源于字典值,必填
"executorBlockStrategy":"SERIAL_EXECUTION", //阻塞处理策略,来源于字典值,必填
"executorFailRetryCount":0, // 失败重试次数,大于0时生效,选填
"executorHandler":"commonTimeRuleJob", // 执行处理器,选填,不填,BEAN类型下,默认为 commonTimeRuleJob
"executorTimeout":0, // 执行超时时间,大于0时生效
"misfireStrategy":"DO_NOTHING", //调度过期策略,来源于字典值
"alarmEmail": "", // 报警邮箱,多个用英文,隔开,选填
"glueType":"BEAN", // BEAN 类型,目前写死即可,不填,默认即为BEAN
"glueRemark":"备注" // 备注
}
返回:
{
"code":200, // 成功
"content":"1" // 任务ID
}
URL:http://develop.persagy.com/job-admin/customInfo/add
Method:POST
Header:Content-Type=application/json
请求:
{
"jobGroup": 1, // 执行器主键ID,必填
"childJobId":"", // 子级任务ID,选填
"jobDesc": "测试", // 任务描述,必填
"scheduleConf":"0/20 * * * * ?", //cron表达式,或者时间间隔单位:S,根据 scheduleType 来,必填
"scheduleType": "CRON", //调度类型,根据字典值来,必填
"author":"测试人员", // 负责人,必填
"executorParam":{ // 任务参数,必填
"test":"123",
"callBackUrl":"http://www.baidu.com" // 回调地址,必填
},
"executorRouteStrategy":"ROUND", //路由策略,来源于字典值,必填
"executorBlockStrategy":"SERIAL_EXECUTION", //阻塞处理策略,来源于字典值,必填
"executorFailRetryCount":0, // 失败重试次数,大于0时生效,选填
"executorHandler":"commonTimeRuleJob", // 执行处理器,选填,不填,BEAN类型下,默认为 commonTimeRuleJob
"executorTimeout":0, // 执行超时时间,大于0时生效
"misfireStrategy":"DO_NOTHING", //调度过期策略,来源于字典值
"alarmEmail": "", // 报警邮箱,多个用英文,隔开,选填
"glueType":"BEAN", // BEAN 类型,目前写死即可,不填,默认即为BEAN
"glueRemark":"备注" // 备注
}
返回:
{
"code":200, // 成功
"content":"2" // 任务ID
}
URL:http://develop.persagy.com/job-admin/customInfo/update
Method:POST
Header:Content-Type=application/json
请求:
{
"jobGroup": 1, // 执行器主键ID,必填
"childJobId":"", // 子级任务ID,选填
"jobDesc": "测试", // 任务描述,必填
"scheduleConf":"0/20 * * * * ?", //cron表达式,或者时间间隔单位:S,根据 scheduleType 来,必填
"scheduleType": "CRON", //调度类型,根据字典值来,必填
"author":"测试人员", // 负责人,必填
"executorParam":{ // 任务参数,必填
"test":"123",
"callBackUrl":"http://www.baidu.com" // 回调地址,必填
},
"executorRouteStrategy":"ROUND", //路由策略,来源于字典值,必填
"executorBlockStrategy":"SERIAL_EXECUTION", //阻塞处理策略,来源于字典值,必填
"executorFailRetryCount":0, // 失败重试次数,大于0时生效,选填
"executorHandler":"commonTimeRuleJob", // 执行处理器,选填,不填,BEAN类型下,默认为 commonTimeRuleJob
"executorTimeout":0, // 执行超时时间,大于0时生效
"misfireStrategy":"DO_NOTHING", //调度过期策略,来源于字典值
"alarmEmail": "", // 报警邮箱,多个用英文,隔开,选填
"glueType":"BEAN", // BEAN 类型,目前写死即可,不填,默认即为BEAN
"glueRemark":"备注" // 备注
}
返回:
{
"code":200
}
URL:http://develop.persagy.com/job-admin/customInfo/start
Method:POST
Header:Content-Type=application/json
请求:
{
"id":1 // 任务ID
}
返回:
{
"code":200
}
URL:http://develop.persagy.com/job-admin/customInfo/stop
Method:POST
Header:Content-Type=application/json
请求:
{
"id":1 // 任务ID
}
返回:
{
"code":200
}
URL:http://develop.persagy.com/job-admin/customInfo/remove
Method:POST
Header:Content-Type=application/json
请求:
{
"id":1 // 任务ID
}
返回:
{
"code":200 //成功
}
URL:http://develop.persagy.com/job-admin/dict/dictQuery
Method:POST
Header:Content-Type=application/json
请求:
{
"queryType":"executorRouteStrategy" // 字段取值参考下面说明
}
返回:
// 根据queryType的不同,返回值如下
// 路由策略 queryType: executorRouteStrategy
{
"code": 200,
"content": {
"BUSYOVER": "忙碌转移",
"CONSISTENT_HASH": "一致性HASH",
"LAST": "最后一个",
"SHARDING_BROADCAST": "分片广播",
"ROUND": "轮询",
"RANDOM": "随机",
"LEAST_RECENTLY_USED": "最近最久未使用",
"FIRST": "第一个",
"LEAST_FREQUENTLY_USED": "最不经常使用",
"FAILOVER": "故障转移"
}
}
// 阻塞策略 queryType: executorBlockStrategy
{
"code": 200,
"content": {
"COVER_EARLY": "覆盖之前调度",
"SERIAL_EXECUTION": "单机串行",
"DISCARD_LATER": "丢弃后续调度"
}
}
// 调度过期策略 queryType: misfireStrategy
{
"code": 200,
"content": {
"DO_NOTHING": "忽略",
"FIRE_ONCE_NOW": "立即执行一次"
}
}
// 调度类型 queryType: scheduleType
{
"code": 200,
"content": {
"CRON": "CRON",
"NONE": "无", // 暂
"FIX_RATE": "固定速度"
}
}