Queries the details of a job based on the job ID. In most cases, the obtained information is used to update jobs.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
edas:ReadSchedulerxJobQuery |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| JobId |
integer |
Yes |
The job ID. You can obtain the job ID on the Task Management page in the SchedulerX console. |
92583 |
| GroupId |
string |
Yes |
The application ID. You can obtain the application ID on the Application Management page in the SchedulerX console. |
testSchedulerx.defaultGroup |
| 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 |
| RegionId |
string |
Yes |
The region ID. |
cn-hangzhou |
| JobName |
string |
No |
The job name. |
simpleJob |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
integer |
The HTTP status code. |
200 |
| Message |
string |
The error message returned only if an error occurs. |
jobid: 92583 not match groupId: testSchedulerx.defaultGroup |
| RequestId |
string |
The request ID. |
4F68ABED-AC31-4412-9297-D9A8F0401108 |
| Success |
boolean |
Indicates whether the job details were obtained. Valid values:
|
true |
| Data |
object |
The details of the job. |
|
| JobConfigInfo |
object |
The configurations of the job. |
|
| JobId |
integer |
The job ID. |
538039 |
| Status |
integer |
Indicates whether the job was enabled. Valid values:
|
1 |
| Parameters |
string |
The user-defined parameters that you can obtain when the job is running. |
test |
| Description |
string |
The description of the job. |
test |
| ExecuteMode |
string |
The execution mode of the job. Valid values:
|
standalone |
| MaxConcurrency |
string |
The maximum number of concurrent instances. Default value: 1. The default value indicates that if the last triggered instance is running, the next instance is not triggered even if the scheduled point in time for running the next instance is reached. |
1 |
| Name |
string |
The job name. |
helloworld |
| MaxAttempt |
integer |
The maximum number of retries after a job failure. This parameter was specified based on your business requirements. Default value: 0. |
0 |
| Content |
string |
The script of a script job. |
echo "clear" > /home/admin/edas-container/logs/catalina.out |
| JarUrl |
string |
The full path used to upload files to Object Storage Service (OSS). If you use a JAR package, you can upload the JAR package to this OSS path. |
https://test.oss-cn-hangzhou.aliyuncs.com/schedulerX/test.jar |
| ClassName |
string |
The full path of the job interface class. This parameter is returned only for jobs whose job type is Java. |
com.alibaba.test.helloword |
| JobType |
string |
The job type. |
java |
| AttemptInterval |
integer |
The interval at which the system retried to run the job after a job failure. Default value: 30. Unit: seconds. |
30 |
| MapTaskXAttrs |
object |
The advanced configurations of the job. |
|
| TaskMaxAttempt |
integer |
The number of retries after a task failure. |
0 |
| TaskAttemptInterval |
integer |
The interval at which the system retried to run the task after a task failure. |
0 |
| ConsumerSize |
integer |
The number of threads that were triggered by a single worker at a time. Default value: 5. |
5 |
| QueueSize |
integer |
The maximum number of tasks that can be queued. Default value: 10000. |
10000 |
| DispatcherSize |
integer |
The number of task distribution threads. Default value: 5. |
5 |
| PageSize |
integer |
The number of tasks that were pulled by a parallel job at a time. Default value: 100. |
100 |
| TimeConfig |
object |
The time configurations. |
|
| Calendar |
string |
Custom calendar days specified if TimeType is set to 1 (cron). |
workday |
| TimeType |
integer |
The time type. Valid values:
|
1 |
| DataOffset |
integer |
The time offset specified if TimeType is set to 1 (cron). Unit: seconds. |
0 |
| TimeExpression |
string |
The time expression specified based on the value of TimeType:
|
0 0/10 * * * ? |
| JobMonitorInfo |
object |
The monitoring information of the job. |
|
| ContactInfo |
array<object> |
The alert contact Information. |
|
|
object |
|||
| UserPhone |
string |
The mobile phone number of the alert contact. |
1381111**** |
| UserName |
string |
The name of the alert contact. |
userA |
| UserMail |
string |
The email address of the alert contact. |
user@demo.com |
| Ding |
string |
The webhook URL of the DingTalk chatbot. |
https://oapi.dingtalk.com/robot/send?access_token=XXXXXX |
| MonitorConfig |
object |
The configurations of the alerting features and the alert thresholds. |
|
| Timeout |
integer |
The timeout threshold. Default value: 7200. Unit: seconds. |
12300 |
| SendChannel |
string |
The method used to send alerts. Only Short Message Service (SMS) is supported. |
sms |
| TimeoutKillEnable |
boolean |
Indicates whether the Timeout termination switch was turned on. The switch is turned off by default. |
true |
| TimeoutEnable |
boolean |
Indicates whether the Timeout alarm switch was turned on. Valid values:
|
true |
| FailEnable |
boolean |
Indicates whether the Failure alarm switch was turned on. Valid values:
|
true |
| MissWorkerEnable |
boolean |
Indicates whether the No machine alarm available switch was turned on. |
true |
| XAttrs |
string |
The extended fields. |
{"pageSize":5,"queueSize":10,"consumerSize":5,"dispatcherSize":5,"taskMaxAttempt":0,"taskAttemptInterval":0,"globalConsumerSize":1000,"taskDispatchMode":"push"} |
Examples
Success response
JSON format
{
"Code": 200,
"Message": "jobid: 92583 not match groupId: testSchedulerx.defaultGroup",
"RequestId": "4F68ABED-AC31-4412-9297-D9A8F0401108",
"Success": true,
"Data": {
"JobConfigInfo": {
"JobId": 538039,
"Status": 1,
"Parameters": "test",
"Description": "test",
"ExecuteMode": "standalone",
"MaxConcurrency": "1",
"Name": "helloworld",
"MaxAttempt": 0,
"Content": "echo \"clear\" > /home/admin/edas-container/logs/catalina.out ",
"JarUrl": "https://test.oss-cn-hangzhou.aliyuncs.com/schedulerX/test.jar",
"ClassName": "com.alibaba.test.helloword",
"JobType": "java",
"AttemptInterval": 30,
"MapTaskXAttrs": {
"TaskMaxAttempt": 0,
"TaskAttemptInterval": 0,
"ConsumerSize": 5,
"QueueSize": 10000,
"DispatcherSize": 5,
"PageSize": 100
},
"TimeConfig": {
"Calendar": "workday",
"TimeType": 1,
"DataOffset": 0,
"TimeExpression": "0 0/10 * * * ?"
},
"JobMonitorInfo": {
"ContactInfo": [
{
"UserPhone": "1381111****",
"UserName": "userA",
"UserMail": "user@demo.com",
"Ding": "https://oapi.dingtalk.com/robot/send?access_token=XXXXXX"
}
],
"MonitorConfig": {
"Timeout": 12300,
"SendChannel": "sms",
"TimeoutKillEnable": true,
"TimeoutEnable": true,
"FailEnable": true,
"MissWorkerEnable": true
}
},
"XAttrs": "{\"pageSize\":5,\"queueSize\":10,\"consumerSize\":5,\"dispatcherSize\":5,\"taskMaxAttempt\":0,\"taskAttemptInterval\":0,\"globalConsumerSize\":1000,\"taskDispatchMode\":\"push\"}"
}
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.