Creates a task and returns the task ID.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
edas:CreateSchedulerxJobCreate |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The ID of the region. |
cn-hangzhou |
| Namespace |
string |
Yes |
The ID of the namespace. You can find this ID on the Namespaces page in the SchedulerX console. |
adcfc35d-e2fe-4fe9-bbaa-20e90ffc**** |
| NamespaceSource |
string |
No |
This parameter is required only for specific third-party integrations. |
schedulerx |
| GroupId |
string |
Yes |
The ID of the application. You can find the application ID on the Application Management page in the SchedulerX console. |
testSchedulerx.defaultGroup |
| JobType |
string |
Yes |
The type of the job. The following job types are supported:
Valid values:
|
java |
| Name |
string |
Yes |
The job name. |
helloworld |
| Description |
string |
No |
The job description. |
Test |
| ExecuteMode |
string |
Yes |
The job execution mode. Valid values:
Valid values:
|
standalone |
| ClassName |
string |
No |
The fully qualified name of the job interface class. This parameter is required if you set |
com.alibaba.schedulerx.test.helloworld |
| Content |
string |
No |
|
echo 'hello' |
| Parameters |
string |
No |
User-defined parameters that the job can retrieve at runtime. |
test |
| MaxConcurrency |
integer |
No |
The maximum number of concurrent job instances. Defaults to 1. When this limit is reached, scheduled job instances are skipped until a running instance completes. |
1 |
| MaxAttempt |
integer |
No |
The maximum number of retries for a failed job. Default: 0. |
0 |
| AttemptInterval |
integer |
No |
The interval between retries for a failed job, in seconds. Default: 30. |
30 |
| PageSize |
integer |
No |
For |
100 |
| ConsumerSize |
integer |
No |
For |
5 |
| QueueSize |
integer |
No |
For |
10000 |
| DispatcherSize |
integer |
No |
For |
5 |
| TimeType |
integer |
Yes |
The type of the time expression. Valid values:
Valid values:
|
1 |
| TimeExpression |
string |
No |
The format of this expression depends on the value of
|
0 0/10 * * * ? |
| Calendar |
string |
No |
If |
|
| DataOffset |
integer |
No |
If |
2400 |
| Timezone |
string |
No |
The time zone for scheduling. |
GMT+8 |
| TimeoutEnable |
boolean |
No |
Specifies whether to send an alert when a job times out. Valid values:
Valid values:
|
false |
| Timeout |
integer |
No |
The timeout threshold in seconds. Default: 7,200. |
7200 |
| TimeoutKillEnable |
boolean |
No |
Specifies whether to terminate a job that has timed out. Valid values:
Valid values:
|
false |
| FailEnable |
boolean |
No |
Specifies whether to send an alert when a job fails. Valid values:
Valid values:
|
false |
| FailTimes |
integer |
No |
The number of consecutive failures that trigger an alert. |
2 |
| MissWorkerEnable |
boolean |
No |
Specifies whether to send an alert if no workers are available to run the job. Valid values:
|
false |
| SuccessNoticeEnable |
boolean |
No |
Specifies whether to send a notification upon successful job completion. |
false |
| SendChannel |
string |
No |
The channel for sending alert notifications. Valid values:
Valid values:
|
sms |
| TaskMaxAttempt |
integer |
No |
For |
0 |
| TaskAttemptInterval |
integer |
No |
For |
0 |
| ContactInfo |
array<object> |
No |
The contact information for the job. Important This parameter is deprecated. |
1 |
|
object |
No |
The contact information for the job. |
||
| UserPhone |
string |
No |
The mobile phone number of the alert contact. |
1381111**** |
| UserName |
string |
No |
The name of the alert contact. |
John Smith |
| UserMail |
string |
No |
The email address of the alert contact. |
test***@***.com |
| Ding |
string |
No |
The webhook URL of the DingTalk group chatbot for receiving alert notifications. For more information, see the DingTalk documentation. |
https://oapi.dingtalk.com/robot/send?access_token=********** |
| Status |
integer |
No |
Specifies whether to enable the job. Valid values: |
1 |
| XAttrs |
string |
No |
The extended attributes for the job, required when |
{"resource":"job"} |
| Priority |
integer |
No |
The job priority. Valid values:
|
5 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
integer |
The response code. |
200 |
| Message |
string |
A message that provides details about the response. |
message |
| RequestId |
string |
The unique request ID. |
39090022-1F3B-4797-8518-6B61095F1AF0 |
| Success |
boolean |
Specifies whether the job was created successfully. Valid values:
|
true |
| Data |
object |
The job details. |
|
| JobId |
integer |
The job ID. |
92583 |
Examples
Success response
JSON format
{
"Code": 200,
"Message": "message",
"RequestId": "39090022-1F3B-4797-8518-6B61095F1AF0",
"Success": true,
"Data": {
"JobId": 92583
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.