创建定时任务
可选cacheTime?: number下行缓存时间,单位秒,值范围:0-7776000
接口调用结束的回调函数(调用成功、失败都会执行)
可选dayOfWeek?: string设备 deviceKey
可选enabled?: boolean定时任务状态,启动:true,停止:false
接口调用失败的回调函数
产品 productKey
接口调用成功的回调函数
定时任务列表
可选timeZone?: string时区偏移量,格式:+-HH:mm,例如:+08:00
可选timeZoneId?: string定时任务类型
const plugin = requirePlugin('quecPlugin')
plugin.scheduledTask.addCornJobV2({
dayOfWeek: "1",
dk: "xx",
enabled: true,
pk: "xxx",
timers: [{
time: "01:00:00",
action:"[
{"modelCode":"switch","modelName":"开关","modelType":"PROPERTY","dataType":"BOOL","value":true},
{"modelCode":"temperature","modelName":"目标温度","modelType":"PROPERTY","dataType":"INT","value":10}
]",
delay:0,
taskLogo:'',
taskName:''
cacheTime:0
}],
type: "custom-repeat"
success (res) {},
fail (res) {},
complete (res) { }
})
批量删除定时任务
接口调用结束的回调函数(调用成功、失败都会执行)
接口调用失败的回调函数
定时任务 ID 列表
接口调用成功的回调函数
查询定时任务详情
接口调用结束的回调函数(调用成功、失败都会执行)
接口调用失败的回调函数
定时任务 ID
接口调用成功的回调函数
查询定时任务列表
接口调用结束的回调函数(调用成功、失败都会执行)
设备 deviceKey
接口调用失败的回调函数
可选page?: number当前页码
可选pageSize?: number每页数量
产品 productKey
接口调用成功的回调函数
可选type?: CornJobType定时任务类型
修改定时任务
可选cacheTime?: number下行缓存时间,单位秒,值范围:0-7776000
接口调用结束的回调函数(调用成功、失败都会执行)
设备 deviceKey
可选enabled?: boolean定时任务状态,启动:true,停止:false
接口调用失败的回调函数
产品 productKey
接口调用成功的回调函数
定时任务列表
可选timeZone?: string时区偏移量,格式:+-HH:mm,例如:+08:00
可选timeZoneId?: string定时任务类型
const plugin = requirePlugin('quecPlugin')
plugin.scheduledTask.setCronJobV2({
ruleId:1,
dayOfWeek: "1",
dk: "xx",
enabled: true,
pk: "xxx",
timers: [{
time: "01:00:00",
action:"[
{"modelCode":"switch","modelName":"开关","modelType":"PROPERTY","dataType":"BOOL","value":true},
{"modelCode":"temperature","modelName":"目标温度","modelType":"PROPERTY","dataType":"INT","value":10}
]",
delay:0,
taskLogo:'',
taskName:''
cacheTime:0
}],
type: "custom-repeat"
success (res) {},
fail (res) {},
complete (res) { }
})
定时任务