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 the ID on the Namespaces page in the console. |
adcfc35d-e2fe-4fe9-bbaa-20e90ffc**** |
| NamespaceSource |
string |
No |
This parameter is required only for specific third-party integrations. |
schedulerx |
| GroupId |
string |
Yes |
The application ID. You can find the ID on the Application Management page in the console. |
testSchedulerx.defaultGroup |
| JobType |
string |
Yes |
The type of the job. Supported job types:
Valid values:
|
java |
| Name |
string |
Yes |
The job name. |
helloworld |
| Description |
string |
No |
The job description. |
Test |
| ExecuteMode |
string |
Yes |
The job execution mode. Supported values:
Valid values:
|
standalone |
| ClassName |
string |
No |
The fully qualified class name of the job interface. Required for |
com.alibaba.schedulerx.test.helloworld |
| Content |
string |
No |
|
echo 'hello' |
| Parameters |
string |
No |
Custom parameters that the job can retrieve at runtime. |
test |
| MaxConcurrency |
integer |
No |
The maximum number of concurrent job instances. Defaults to 1. If an existing job instance is still running, a new one will not be triggered, even if its scheduled time has passed. |
1 |
| MaxAttempt |
integer |
No |
The maximum number of retries for a failed job. Defaults to 0. |
0 |
| AttemptInterval |
integer |
No |
The retry interval for a failed job, in seconds. Defaults to 30. |
30 |
| PageSize |
integer |
No |
[Advanced] For |
100 |
| ConsumerSize |
integer |
No |
[Advanced] For |
5 |
| QueueSize |
integer |
No |
[Advanced] For |
10000 |
| DispatcherSize |
integer |
No |
[Advanced] For |
5 |
| TimeType |
integer |
Yes |
The scheduling type. Supported values:
Valid values:
|
1 |
| TimeExpression |
string |
No |
The time expression, which depends on the value of
|
0 0/10 * * * ? |
| Calendar |
string |
No |
For a |
|
| DataOffset |
integer |
No |
The time offset in seconds for a |
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 in seconds. Defaults to 7200. |
7200 |
| TimeoutKillEnable |
boolean |
No |
Specifies whether to terminate the job upon timeout. Valid values:
Valid values:
|
false |
| FailEnable |
boolean |
No |
Specifies whether to enable alerts for failed jobs. Valid values:
Valid values:
|
false |
| FailTimes |
integer |
No |
The number of consecutive failures that triggers an alert. |
2 |
| MissWorkerEnable |
boolean |
No |
Specifies whether to send an alert when no worker is available to run the job.
|
false |
| SuccessNoticeEnable |
boolean |
No |
Specifies whether to send a notification when the job succeeds. |
false |
| SendChannel |
string |
No |
The channel for sending alerts.
Valid values:
|
sms |
| TaskMaxAttempt |
integer |
No |
[Advanced] For |
0 |
| TaskAttemptInterval |
integer |
No |
[Advanced] 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 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 bot for alert notifications. For more information, see DingTalk Developer Documentation. |
https://oapi.dingtalk.com/robot/send?access_token=********** |
| Status |
integer |
No |
The job status. 1 = Enabled, 0 = Disabled. Defaults to 1. |
1 |
| XAttrs |
string |
No |
This parameter is required for |
{"resource":"job"} |
| Priority |
integer |
No |
The job priority. 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 unique request ID. |
39090022-1F3B-4797-8518-6B61095F1AF0 |
| Success |
boolean |
Indicates whether the job was created. 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.