Skip to content

查询定时任务详情

接口地址:/v2/cep/enduserapi/v2/getCronJobInfo

请求方式:GET

请求数据类型:application/x-www-form-urlencoded

响应数据类型:*/*

接口描述:

查询定时任务详情

请求参数:

参数名称参数说明请求类型是否必须数据类型schema
ruleId定时任务规则IDquerytruestring
Authorizationheaderfalsestring

响应状态:

状态码说明schema
200OKApiResult«定时任务详情»
401Unauthorized
403Forbidden
404Not Found
5041没有权限
5593请输入定时任务ID
5594查询定时任务失败

响应参数:

参数名称参数说明类型schema
codeinteger(int32)integer(int32)
data定时任务详情定时任务详情
  cacheTime下行缓存时间,单位秒,值范围:0-7776000integer(int64)
  createTime创建时间integer(int64)
  dayOfWeek重复周期,1:周一,2:周二,3:周三,4:周四,5:周五,6:周六,7:周日,多个使用英文逗号分隔,当 type = custom-repeatmulti-section
  deviceKey设备KEYstring
  enabled定时任务状态,true:启动,false:停止boolean
  productKey产品KEYstring
  ruleId定时任务规则IDstring
  timeZone时区,格式:+-HH:mmstring
  timers定时任务列表,当 type = multi-section 时,定时任务数量限制为 2-5 个array定时任务Res
    action定时任务执行的命令,格式:物模型JSON字符串string
    cacheTime下行缓存时间,单位秒,值范围:0-7776000integer
    delay延迟执行时间,单位秒,当 type = delay 时必填integer
    taskLogo任务图标string
    taskName任务名称string
    time执行时间,格式:HH:mm:ss,当 type = onceday-repeat
    timerId定时任务IDstring
  type定时任务类型,once:执行一次,day-repeat:每天重复,custom-repeat:每周重复,multi-section:多段执行,delay:倒计时string
extMsgstring
msgstring

响应示例:

javascript
{
	"code": 0,
	"data": {
		"cacheTime": 0,
		"createTime": 0,
		"dayOfWeek": "",
		"deviceKey": "",
		"enabled": true,
		"productKey": "",
		"ruleId": "",
		"timeZone": "",
		"timers": [
			{
				"action": "",
				"cacheTime": 0,
				"delay": 0,
				"taskLogo": "",
				"taskName": "",
				"time": "",
				"timerId": ""
			}
		],
		"type": ""
	},
	"extMsg": "",
	"msg": ""
}