Updates the configuration information about a job. By default, you need to call the GetJobInfo operation to obtain the original configuration of the job before you call this operation to modify the configuration as required.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
edas:ManageSchedulerxJobModify | update | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID. | cn-hangzhou |
Namespace | string | Yes | The namespace ID. You can obtain the namespace ID on the Namespace page in the SchedulerX console. | adcfc35d-e2fe-4fe9-bbaa-20e90ffc**** |
NamespaceSource | string | No | The namespace source. This parameter is required only for a special third party. | schedulerx |
GroupId | string | Yes | The application ID. You can obtain the application ID on the Application Management page in the SchedulerX console. | testSchedulerx.defaultGroup |
JobId | long | Yes | The job ID. You can obtain the job ID on the Task Management page in the SchedulerX console. | 92583 |
Name | string | No | The job name. | helloword |
Description | string | No | The job description. | test |
ExecuteMode | string | No | The execution mode of the job. Valid values:
| standalone |
ClassName | string | No | The full path of the job interface class. This field is available only when you set the job type to java. In this case, you must enter a full path. | com.alibaba.test.helloworld |
Content | string | No | The script content. This parameter is required when you set the job type to python, shell, go, or k8s. | echo 'hello' |
Parameters | string | No | The user-defined parameters that you can obtain when the job is running. | test |
MaxConcurrency | integer | No | The maximum number of concurrent instances. Default value: 1. The default value indicates that only one instance is allowed to run at a time. When an instance is running, another instance is not triggered even if the scheduled time for running the instance is reached. | 1 |
MaxAttempt | integer | No | The maximum number of retries after a job failure. This parameter is specified based on your business requirements. | 0 |
AttemptInterval | integer | No | The interval of retries after a job failure. Default value: 30. Unit: seconds. | 30 |
PageSize | integer | No | The number of tasks that can be pulled at a time. Default value: 100. This parameter is an advanced configuration item of the MapReduce job. | 100 |
TaskDispatchMode | string | No | The job mode. Valid values: push and pull. This parameter is an advanced configuration item of the MapReduce job. | push |
ConsumerSize | integer | No | The number of threads that are triggered by a single worker at a time. Default value: 5. This parameter is an advanced configuration item of the MapReduce job. | 5 |
QueueSize | integer | No | The maximum number of tasks that can be queued. Default value: 10000. This parameter is an advanced configuration item of the MapReduce job. | 10000 |
DispatcherSize | integer | No | The number of task distribution threads. Default value: 5. This parameter is an advanced configuration item of the MapReduce job. | 5 |
TaskMaxAttempt | integer | No | The number of retries after a task failure. This parameter is an advanced configuration item of the MapReduce job. | 0 |
TaskAttemptInterval | integer | No | The interval of retries after a task failure. This parameter is an advanced configuration item of the MapReduce job. | 0 |
TimeType | integer | No | The time type. Valid values:
| 1 |
TimeExpression | string | No | The time expression. Specify the time expression based on the value of TimeType:
| 30 |
Calendar | string | No | If you set TimeType to 1 (cron), you can specify calendar days. | Business days |
DataOffset | integer | No | If you set TimeType to 1 (cron), you can specify a time offset. Unit: seconds. | 2400 |
Timezone | string | No | Time zone. | GMT+8 |
TimeoutEnable | boolean | No | Specifies whether to turn on Timeout alarm. If the switch is turned on, an alert will be generated upon a timeout. Valid values:
| true |
Timeout | long | No | The timeout threshold. Unit: seconds. | 7200 |
TimeoutKillEnable | boolean | No | Specifies whether to turn on Timeout termination. If the switch is turned on, the job will be terminated upon a timeout. Valid values:
| true |
FailEnable | boolean | No | Specifies whether to turn on Failure alarm. If the switch is turned on, an alert will be generated upon a failure. Valid values:
| true |
FailTimes | integer | No | The number of consecutive failures. An alert will be received if the number of consecutive failures reaches the value of this parameter. | 1 |
MissWorkerEnable | boolean | No | Specifies whether to turn on No machine alarm available. If the switch is turned on, an alert will be generated when no machine is available for running the job. Valid values:
| true |
SuccessNoticeEnable | boolean | No | Specifies whether to turn on Successful notice. If the switch is turned on, a notice will be sent when a job succeeds. | false |
SendChannel | string | No | The method that is used to send alerts. Only Short Message Service (SMS) is supported. | sms |
ContactInfo | array<object> | No | The information about the alert contact. | |
object | No | |||
UserPhone | string | No | The mobile phone number of the alert contact. | 1381111**** |
UserName | string | No | The name of the alert contact. | userA |
UserMail | string | No | The email address of the alert contact. | test***@***.com |
Ding | string | No | https://oapi.dingtalk.com/robot/send?access_token=********** | |
XAttrs | string | No | If you set JobType to k8s, this parameter is required. xxljob task: {"resource":"job"} shell task: {"image":"busybox","resource":"shell"} | {"resource":"shell","fileFormat":"unix","templateType":"customTemplate"} |
Template | string | No | Custom task template for the k8s task type. | apiVersion: v1 kind: Pod metadata: name: schedulerx-node-{JOB_ID} namespace: {NAMESPACE} spec: containers: - name: node-job image: node:16 imagePullPolicy: IfNotPresent volumeMounts: - name: script-node mountPath: script/node command: ["node", "script/node/node-{JOB_ID}.js"] volumes: - name: script-node configMap: name: schedulerx-configmap items: - key: schedulerx-node-{JOB_ID} path: node-{JOB_ID}.js restartPolicy: Never |
Response parameters
Examples
Sample success responses
JSON
format
{
"Code": 200,
"Message": "job type is java className can not be blank",
"RequestId": "4F68ABED-AC31-4412-9297-D9A8F0401108",
"Success": true
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-10-18 | The response structure of the API has changed | View Change Details |
2023-06-07 | The request parameters of the API has changed | View Change Details |
2023-03-30 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2022-12-26 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2022-09-28 | The internal configuration of the API is changed, but the call is not affected | View Change Details |