20190816-任务调度后台接口.md
2.21 KB
1. 【网页接口】查询全部定时任务列表接口
- URL: {{localhost}}/boxfish-data-market/market/scheduleJob/getScheduleJobList
- Method: POST
- RequestBody
{
"pageSize": 40,
"pageId": 0,
"operator": "zzz@boxfish.cn" // 查询条件:登记定时任务的人
}
- ResponseBody:
{
"status": "SUCCESS",
"totalCount": 8,
"totalPage": 2,
"list": [
{
"taskId": 1,
"operator": "xxx@boxfish.cn",
"fileName": "这是一个测试任务:Test1",
"mailList": "huayandong@boxfish.cn",
"cron": "0 0/1 8-20 * * ?",
"flagEnable": true
},
{
"taskId": 2,
"operator": "xxx@boxfish.cn",
"fileName": "这是一个测试任务:Test2",
"mailList": "huayandong@boxfish.cn",
"cron": "10 0/1 8-20 * * ?",
"flagEnable": false
},
{
"taskId": 3,
"operator": "xxx@boxfish.cn",
"fileName": "这是一个测试任务:Test3",
"mailList": "huayandong@boxfish.cn",
"cron": "20 0/1 8-20 * * ?",
"flagEnable": true
},
{
"taskId": 4,
"operator": "xxx@boxfish.cn",
"fileName": "这是一个测试任务:Test4",
"mailList": "huayandong@boxfish.cn",
"cron": "30 0/1 8-20 * * ?",
"flagEnable": false
}
]
}
2. 【网页接口】删除定时任务
- URL: {{localhost}}/boxfish-data-market/market/scheduleJob/deleteSchedule
- Method: POST
- RequestBody
{
"operatorAccount": "xxx@b.cn", // 当前操作人账号
"taskId": 8
}
2. 【网页接口】更新指定定时任务状态
- URL: {{localhost}}/boxfish-data-market/market/scheduleJob/updateScheduleStatus
- Method: POST
- RequestBody
{
"operatorAccount": "xxx@b.cn", // 当前操作人账号
"taskId": 8,
"flagEnable": true
}
flagEnable
: 定时任务的状态,true
表示定时任务开始执行,false
表示定时任务停止执行