描述
创建任务(Create Scheduler job)
API
org.zstack.scheduler.APICreateSchedulerJobMsg
举例(Example)
够用可以使用CreateSchedulerJob来创建一个任务. 例如:
CreateSchedulerJob name=job description='this is a job' targetResourceUuid=vmUuid type=startVm
返回结果:
{
"inventory": {
"createDate": "Jun 20, 2017 10:31:52 AM",
"description": "this is a job",
"lastOpDate": "Jun 20, 2017 10:31:52 AM",
"name": "job",
"targetResourceUuid": "vmUuid",
"triggersUuid": [],
"uuid": "ce506484b3684359b39a8ebeba576621"
},
"success": true
}
参数(Parameters)
| 名字 |
描述 |
可选的参数 |
起始支持版本 |
| name |
|
|
|
| targetResourceUuid |
目标的uuid |
|
|
| description |
|
是 |
0.6 |
| type |
进行的任务类型现在支持(startVm, stopVm, rebootVm, volumeSnapshot) |
|
|
| parameters |
附加参数 |
是 |
|
备注
Feature_link
https://github.com/zstackio/functional-spec/issues/29