UpdateJob

更新时间:
复制 MD 格式

Update task details.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

ClusterId

string

Yes

The cluster ID.

xxljob-b6ec1xxxx

AppName

string

Yes

The application name.

test-app

JobId

integer

Yes

The job ID.

74

Name

string

No

The job name.

test-job

Description

string

No

The job description.

test

RouteStrategy

integer

No

The routing strategy. Valid values:

  • 1: round-robin

  • 2: random

  • 3: first

  • 4: last

  • 5: least frequently used

  • 6: least recently used

  • 7: consistent hashing

  • 8: sharded broadcast

1

Parameters

string

No

The job parameters.

test

MaxConcurrency

integer

No

The maximum number of concurrent job instances.

Note

This parameter defines the maximum number of instances for a single job that can run concurrently. A value of 1 prevents duplicate execution. If this limit is exceeded, the scheduler skips the current job.

1

MaxAttempt

integer

No

The maximum number of retries for a failed job.

3

AttemptInterval

integer

No

The interval in seconds between retry attempts.

3

JobHandler

string

No

The job handler name.

testJobVoidHandler

Script

string

No

The script content for non-BEAN jobs.

echo "hello world"

TimeType

integer

No

The time type. Valid values:

  • -1: none

  • 1: cron

  • 3: fixed_rate

  • 5: one_time

  • 100: api

1

TimeExpression

string

No

The time expression. The expression format depends on the TimeType.

  • none: Leave this parameter empty.

  • cron: Specify a standard cron expression. Online validation is supported.

  • api: Leave this parameter empty.

  • fixed_rate: An integer that represents a fixed interval in seconds. For example, 30 triggers the job every 30 seconds.

  • one_time: A single execution time, specified in the yyyy-MM-dd HH:mm:ss format or as a timestamp in milliseconds. For example, "2022-10-10 10:10:00".

0 0 4 ? * Mon/1

Calendar

string

No

The custom calendar.

workday

Priority

integer

No

The job execution priority. Valid values:

  • 1: Low

  • 5: Medium

  • 10: High

  • 15: Very High

10

StartTimeType

string

No

The task execution priority. The following values are supported:

  • 1: Low

  • 5: Medium

  • 10: High

  • 15: Very High

1

StartTime

integer

No

The type of the start time.

1716902187

Timezone

string

No

The start time of the schedule.

Hongkong

NoticeConfig

object

No

Time zone

Note

The default is the time zone of the SchedulerX server.

TimeoutEnable

boolean

No

Indicates whether to enable the timeout alarm. Set to true to enable the alarm, or false to disable it.

true

Timeout

integer

No

The job execution timeout in seconds.

90

TimeoutKillEnable

boolean

No

Indicates whether to terminate a timed-out job. Set to true to terminate the job, or false to let it continue.

true

SuccessNotice

boolean

No

Indicates whether to enable success notifications. Set to true to enable notifications, or false to disable them.

true

FailEnable

boolean

No

Indicates whether to enable the failure alarm. Set to true to enable the alarm, or false to disable it.

true

FailLimitTimes

integer

No

The number of consecutive failures required to trigger a failure alarm.

true

MissWorkerEnable

boolean

No

Indicates whether to enable an alarm if no workers are available. Set to true to enable the alarm, or false to disable it.

true

SendChannel

string

No

The notification channel. Valid values: - sms: sms - phone: voice call - mail: email - webhook: webhook > You can specify multiple channels, separated by commas.

webhook,sms,mail,phone

EndEarlyEnable

boolean

No

Indicates whether to enable an alarm when a job finishes earlier than expected. Set to true to enable the alarm, or false to disable it.

EndEarly

integer

No

The threshold, in seconds, for a job to be considered as finishing early.

30

NoticeContacts

array<object>

No

Notification configuration

object

No

-

ContactType

integer

No

The contact type. > Default value: 1.

1

Name

string

No

The contact name.

xiaoming

ExecutorBlockStrategy

integer

No

Notification contact configuration

1

ChildJobId

string

No

The client blocking strategy.

  • 1: Serial execution

  • 2: Ignore later schedules

  • 3: Overwrite earlier schedules

1,2

Weight

integer

No

The ID of the child job. Separate multiple IDs with a comma.

1

DependentStrategy

integer

No

1

Response elements

Element

Type

Description

Example

object

Code

integer

The response code.

200

Message

string

The error message.

Parameter error: content is null.

RequestId

string

The unique identifier for the request. Alibaba Cloud generates this ID to help you troubleshoot issues.

3808cf26-dde2-4286-8503-b0a2cd4065a7

Success

boolean

Whether the request was successful. Valid values:

  • true: The request succeeded.

  • false: The request failed.

true

Examples

Success response

JSON format

{
  "Code": 200,
  "Message": "Parameter error: content is null.",
  "RequestId": "3808cf26-dde2-4286-8503-b0a2cd4065a7",
  "Success": true
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParameter Parameter error: %s. Parameter error: %s
401 IllegalRequest IllegalRequest: %s. Illegal request:%s
500 InternalError InternalError: %s. System Internal Error: %s
403 NoPermission No permission to perform this operation: %s. No permission to perform this operation: %s
404 NotFound Not found: %s. The resource does not exist: %s

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.