Update job configuration information. By default, the system first invokes the operation to retrieve the job and locate the corresponding field for modification.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
edas:ManageSchedulerxJobModify |
update |
*All Resource
|
None | 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 |
integer |
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. Valid values:
|
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. |
workday |
| 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 |
integer |
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 |
| Priority |
integer |
No |
Task Priority. Valid values:
|
5 |
When you invoke UpdateJob to update a scheduling task, the system deletes the previous configuration of the corresponding parameter instead of retaining it. Therefore, you must first invoke GetJobInfo to obtain the previous configuration of the target task, and then configure it based on your actual requirements.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
integer |
The HTTP status code. |
200 |
| Message |
string |
The additional information returned only if an error occurs. |
job type is java className can not be blank |
| RequestId |
string |
The request ID. |
4F68ABED-AC31-4412-9297-D9A8F0401108 |
| Success |
boolean |
Indicates whether the request was successful. |
true |
Examples
Success response
JSON format
{
"Code": 200,
"Message": "job type is java className can not be blank",
"RequestId": "4F68ABED-AC31-4412-9297-D9A8F0401108",
"Success": true
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.