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 region ID. |
cn-hangzhou |
| Namespace |
string |
Yes |
The namespace ID. You can find this ID on the Namespace page in the console. |
adcfc35d-e2fe-4fe9-bbaa-20e90ffc**** |
| NamespaceSource |
string |
No |
The namespace source. This parameter is required only for specific third-party services. |
schedulerx |
| GroupId |
string |
Yes |
The application ID. You can find this ID on the Application Management page in the console. |
testSchedulerx.defaultGroup |
| JobType |
string |
Yes |
The job type. Valid values:
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 class name of the job interface. This parameter is required if you set |
com.alibaba.schedulerx.test.helloworld |
| Content |
string |
No |
|
echo 'hello' |
| Parameters |
string |
No |
The user-defined parameters. You can obtain the value of this parameter at runtime. |
test |
| MaxConcurrency |
integer |
No |
The maximum number of instances that can be run at the same time. Default value: 1. This indicates that if the last run has not ended, the next run is not triggered even if the scheduled time is reached. |
1 |
| MaxAttempt |
integer |
No |
The number of retries after a job fails. Default value: 0. |
0 |
| AttemptInterval |
integer |
No |
The retry interval. Unit: seconds. Default value: 30. |
30 |
| PageSize |
integer |
No |
The number of subtasks that are pulled at a time. Default value: 100. This parameter is used for advanced configurations of parallel and batch jobs. |
100 |
| ConsumerSize |
integer |
No |
The number of threads that are triggered by a single worker at a time. Default value: 5. This parameter is used for advanced configurations of parallel and batch jobs. |
5 |
| QueueSize |
integer |
No |
The maximum size of the subtask queue. Default value: 10000. This parameter is used for advanced configurations of parallel and batch jobs. |
10000 |
| DispatcherSize |
integer |
No |
The number of threads for distributing subtasks. Default value: 5. This parameter is used for advanced configurations of parallel and batch jobs. |
5 |
| TimeType |
integer |
Yes |
The type of the time expression. Valid values:
Valid values:
|
1 |
| TimeExpression |
string |
No |
The time expression. The format of the time expression varies based on the value of
|
0 0/10 * * * ? |
| Calendar |
string |
No |
Specifies a custom calendar if you set |
暂不支持,不用填写 |
| DataOffset |
integer |
No |
The time offset. Unit: seconds. This parameter is available only if you set |
2400 |
| Timezone |
string |
No |
The time zone. |
GMT+8 |
| TimeoutEnable |
boolean |
No |
Specifies whether to enable timeout alerts. Valid values:
Valid values:
|
false |
| Timeout |
integer |
No |
The timeout threshold. Unit: seconds. Default value: 7200. |
7200 |
| TimeoutKillEnable |
boolean |
No |
Specifies whether to terminate a timed-out job. Valid values:
Valid values:
|
false |
| FailEnable |
boolean |
No |
Specifies whether to enable failure alerts. Valid values:
Valid values:
|
false |
| FailTimes |
integer |
No |
The number of consecutive failures that trigger an alert. |
2 |
| MissWorkerEnable |
boolean |
No |
Specifies whether to enable alerts for no available workers. Valid values:
|
false |
| SuccessNoticeEnable |
boolean |
No |
Specifies whether to send a notification when the job is successful. |
false |
| SendChannel |
string |
No |
The notification channel for sending alerts.
Valid values:
|
sms |
| TaskMaxAttempt |
integer |
No |
The number of retries for a failed subtask. Default value: 0. This parameter is used for advanced configurations of parallel and batch jobs. |
0 |
| TaskAttemptInterval |
integer |
No |
The retry interval for a failed subtask. Default value: 0. This parameter is used for advanced configurations of parallel and batch jobs. |
0 |
| ContactInfo |
array<object> |
No |
The contact information of the job. Important This parameter is deprecated. |
1 |
|
object |
No |
The contact information of the job. |
||
| UserPhone |
string |
No |
The mobile number of the alert contact. |
1381111**** |
| UserName |
string |
No |
The name of the alert contact. |
张三 |
| UserMail |
string |
No |
The email address of the alert contact. |
test***@***.com |
| Ding |
string |
No |
The webhook URL of the DingTalk group chatbot. For more information, see the DingTalk development documentation. |
https://oapi.dingtalk.com/robot/send?access_token=********** |
| Status |
integer |
No |
The job status. Valid values: 0 (disabled) and 1 (enabled). By default, jobs are enabled. |
1 |
| XAttrs |
string |
No |
The extended attributes. This parameter is required if you set |
{"resource":"job"} |
| Priority |
integer |
No |
The priority of the job. Valid values:
|
5 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
integer |
The return code. |
200 |
| Message |
string |
The response message. |
message |
| RequestId |
string |
The ID of the request. |
39090022-1F3B-4797-8518-6B61095F1AF0 |
| Success |
boolean |
Indicates whether the job was created. Valid values:
|
true |
| Data |
object |
The details of the job. |
|
| JobId |
integer |
The ID of the job. |
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.