更新任务执行脚本。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
edas:ManageSchedulerxJobModify |
update |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| JobId |
integer |
是 |
任务 ID,在控制台的任务管理页面中获取 |
301 |
| Namespace |
string |
是 |
命名空间 ID,在控制台的命名空间页面中获取 |
adcfc35d-e2fe-4fe9-bbaa-20e90ffc**** |
| NamespaceSource |
string |
否 |
特殊第三方才需要填写 |
schedulerx |
| GroupId |
string |
是 |
应用 ID,在控制台的应用管理页面中获取 |
testSchedulerx.defaultGroup |
| RegionId |
string |
是 |
地域 ID |
cn-hangzhou |
| VersionDescription |
string |
否 |
脚本版本描述 |
Print job runtime information |
| ScriptContent |
string |
否 |
脚本内容 |
#!/bin/bash # The following are built-in variables provided by the system to retrieve job runtime information echo "Job parameters: #{schedulerx.jobParameters}" echo "Sharding ID: #{schedulerx.shardingId}" echo "Sharding parameters: #{schedulerx.shardingParameters}" echo "Total shards: #{schedulerx.shardingNum}" echo "Retry attempts: #{schedulerx.attempt}" echo "Trigger type: #{schedulerx.triggerType}" echo "Schedule timestamp: #{schedulerx.scheduleTime}" echo "Data timestamp: #{schedulerx.dataTime}" # The last line of output will be returned as the result echo "hello world" # exit 1 indicates failure exit 0 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| Code |
integer |
返回码 |
200 |
| Message |
string |
附加信息,仅出错时返回错误信息。 |
job is not existed, jobId=302 |
| RequestId |
string |
请求唯一 ID |
4F68ABED-AC31-4412-9297-D9A8F0401108 |
| Success |
boolean |
是否成功 |
true |
示例
正常返回示例
JSON格式
{
"Code": 200,
"Message": "job is not existed, jobId=302",
"RequestId": "4F68ABED-AC31-4412-9297-D9A8F0401108\n",
"Success": true
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。