JobProps
Properties for defining a Job.
See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-schedulerx-job
Initializer
import com.aliyun.ros.cdk.schedulerx.JobProps;
JobProps.builder()
.executeMode(java.lang.String)
.executeMode(IResolvable)
.groupId(java.lang.String)
.groupId(IResolvable)
.jobType(java.lang.String)
.jobType(IResolvable)
.name(java.lang.String)
.name(IResolvable)
.namespace(java.lang.String)
.namespace(IResolvable)
.timeType(java.lang.Number)
.timeType(IResolvable)
// .attemptInterval(java.lang.Number)
// .attemptInterval(IResolvable)
// .calendar(java.lang.String)
// .calendar(IResolvable)
// .className(java.lang.String)
// .className(IResolvable)
// .consumerSize(java.lang.Number)
// .consumerSize(IResolvable)
// .contactInfo(IResolvable)
// .contactInfo(java.util.List<IResolvable)
// .contactInfo(ContactInfoProperty>)
// .content(java.lang.String)
// .content(IResolvable)
// .dataOffset(java.lang.Number)
// .dataOffset(IResolvable)
// .description(java.lang.String)
// .description(IResolvable)
// .dispatcherSize(java.lang.Number)
// .dispatcherSize(IResolvable)
// .failEnable(java.lang.Boolean)
// .failEnable(IResolvable)
// .failTimes(java.lang.Number)
// .failTimes(IResolvable)
// .maxAttempt(java.lang.Number)
// .maxAttempt(IResolvable)
// .maxConcurrency(java.lang.Number)
// .maxConcurrency(IResolvable)
// .missWorkerEnable(java.lang.Boolean)
// .missWorkerEnable(IResolvable)
// .namespaceSource(java.lang.String)
// .namespaceSource(IResolvable)
// .pageSize(java.lang.Number)
// .pageSize(IResolvable)
// .parameters(java.lang.String)
// .parameters(IResolvable)
// .priority(java.lang.Number)
// .priority(IResolvable)
// .queueSize(java.lang.Number)
// .queueSize(IResolvable)
// .sendChannel(java.lang.String)
// .sendChannel(IResolvable)
// .successNoticeEnable(java.lang.Boolean)
// .successNoticeEnable(IResolvable)
// .taskAttemptInterval(java.lang.Number)
// .taskAttemptInterval(IResolvable)
// .taskMaxAttempt(java.lang.Number)
// .taskMaxAttempt(IResolvable)
// .timeExpression(java.lang.String)
// .timeExpression(IResolvable)
// .timeout(java.lang.Number)
// .timeout(IResolvable)
// .timeoutEnable(java.lang.Boolean)
// .timeoutEnable(IResolvable)
// .timeoutKillEnable(java.lang.Boolean)
// .timeoutKillEnable(IResolvable)
// .timezone(java.lang.String)
// .timezone(IResolvable)
// .xAttrs(IResolvable)
// .xAttrs(java.util.Map<java.lang.String, java.lang.Object>)
.build();
Properties
| Name | Type | Description |
|---|---|---|
executeMode | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property executeMode: The execute mode of the job. |
groupId | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property groupId: The group ID of the job. |
jobType | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property jobType: The type of the job. |
name | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property name: The name of the job. |
namespace | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property namespace: The namespace of the job. |
timeType | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property timeType: The time type of the job. |
attemptInterval | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property attemptInterval: The retry interval for a failed job, in seconds. |
calendar | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property calendar: For a cron job, you can specify a custom calendar. |
className | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property className: The fully qualified class name of the job interface. |
consumerSize | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property consumerSize: [Advanced] For parallel and grid jobs, this specifies the number of consumer threads per machine for processing subtasks. |
contactInfo | com.aliyun.ros.cdk.core.IResolvable OR java.util.List | Property contactInfo: The contact information for the job. |
content | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property content: - For a python, shell, or k8s job, this parameter specifies the script content. |
dataOffset | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property dataOffset: The time offset in seconds for a cron job. |
description | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property description: The description of the job. |
dispatcherSize | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property dispatcherSize: [Advanced] For parallel and grid jobs, this specifies the number of threads for dispatching subtasks. |
failEnable | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property failEnable: Specifies whether to enable alerts for failed jobs. |
failTimes | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property failTimes: The number of consecutive failures that triggers an alert. |
maxAttempt | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property maxAttempt: The maximum number of retries for a failed job. |
maxConcurrency | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property maxConcurrency: The maximum number of concurrent job instances. |
missWorkerEnable | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property missWorkerEnable: Specifies whether to send an alert when no worker is available to run the job. |
namespaceSource | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property namespaceSource: This parameter is required only for specific third-party integrations. |
pageSize | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property pageSize: [Advanced] For parallel and grid jobs, this specifies the number of subtasks retrieved per pull. |
parameters | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property parameters: The parameters of the job. |
priority | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property priority: The job priority. |
queueSize | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property queueSize: [Advanced] For parallel and grid jobs, this specifies the maximum number of subtasks the queue can hold. |
sendChannel | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property sendChannel: The channel for sending alerts. |
successNoticeEnable | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property successNoticeEnable: Whether success notice is enabled for the job. |
taskAttemptInterval | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property taskAttemptInterval: [Advanced] For parallel and grid jobs, this specifies the retry interval in seconds for a failed subtask. |
taskMaxAttempt | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property taskMaxAttempt: [Advanced] For parallel and grid jobs, this specifies the maximum number of retries for a failed subtask. |
timeExpression | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property timeExpression: The time expression, which depends on the value of TimeType. |
timeout | java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable | Property timeout: The timeout threshold in seconds. |
timeoutEnable | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property timeoutEnable: Specifies whether to enable timeout alerts. |
timeoutKillEnable | java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable | Property timeoutKillEnable: Specifies whether to terminate the job upon timeout. |
timezone | java.lang.String OR com.aliyun.ros.cdk.core.IResolvable | Property timezone: The timezone of the job. |
xAttrs | com.aliyun.ros.cdk.core.IResolvable OR java.util.Map | Property xAttrs: This parameter is required for k8s jobs.For job tasks: {"resource":"job"} For shell tasks: {"image":"busybox","resource":"shell"} . |
executeModeRequired
public java.lang.Object getExecuteMode();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property executeMode: The execute mode of the job.
groupIdRequired
public java.lang.Object getGroupId();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property groupId: The group ID of the job.
jobTypeRequired
public java.lang.Object getJobType();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property jobType: The type of the job.
nameRequired
public java.lang.Object getName();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property name: The name of the job.
namespaceRequired
public java.lang.Object getNamespace();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property namespace: The namespace of the job.
timeTypeRequired
public java.lang.Object getTimeType();
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property timeType: The time type of the job.
cron:1 fixed_rate:3 second_delay:4 one_time :5 api:100 none:-1
attemptIntervalOptional
public java.lang.Object getAttemptInterval();
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property attemptInterval: The retry interval for a failed job, in seconds.
Defaults to 30.
calendarOptional
public java.lang.Object getCalendar();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property calendar: For a cron job, you can specify a custom calendar.
classNameOptional
public java.lang.Object getClassName();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property className: The fully qualified class name of the job interface.
Required for java jobs.
consumerSizeOptional
public java.lang.Object getConsumerSize();
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property consumerSize: [Advanced] For parallel and grid jobs, this specifies the number of consumer threads per machine for processing subtasks.
Defaults to 5.
contactInfoOptional
public java.lang.Object getContactInfo();
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.List
ContactInfoProperty>
Property contactInfo: The contact information for the job.
This parameter is deprecated.
contentOptional
public java.lang.Object getContent();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property content: - For a python, shell, or k8s job, this parameter specifies the script content.
- For a
gojob, the content must be in the following format: {"jobName":"HelloWorld"}
dataOffsetOptional
public java.lang.Object getDataOffset();
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property dataOffset: The time offset in seconds for a cron job.
descriptionOptional
public java.lang.Object getDescription();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property description: The description of the job.
dispatcherSizeOptional
public java.lang.Object getDispatcherSize();
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property dispatcherSize: [Advanced] For parallel and grid jobs, this specifies the number of threads for dispatching subtasks.
Defaults to 5.
failEnableOptional
public java.lang.Object getFailEnable();
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property failEnable: Specifies whether to enable alerts for failed jobs.
Valid values:
- true: Enables failure alerts.
- false: Disables failure alerts.
failTimesOptional
public java.lang.Object getFailTimes();
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property failTimes: The number of consecutive failures that triggers an alert.
maxAttemptOptional
public java.lang.Object getMaxAttempt();
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property maxAttempt: The maximum number of retries for a failed job.
Defaults to 0.
maxConcurrencyOptional
public java.lang.Object getMaxConcurrency();
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property maxConcurrency: 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.
missWorkerEnableOptional
public java.lang.Object getMissWorkerEnable();
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property missWorkerEnable: Specifies whether to send an alert when no worker is available to run the job.
- true: Enables the alert.
- false: Disables the alert.
namespaceSourceOptional
public java.lang.Object getNamespaceSource();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property namespaceSource: This parameter is required only for specific third-party integrations.
pageSizeOptional
public java.lang.Object getPageSize();
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property pageSize: [Advanced] For parallel and grid jobs, this specifies the number of subtasks retrieved per pull.
Defaults to 100.
parametersOptional
public java.lang.Object getParameters();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property parameters: The parameters of the job.
priorityOptional
public java.lang.Object getPriority();
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property priority: The job priority.
Valid values:
- 1: Low
- 5: Medium
- 10: High
- 15: Very High
queueSizeOptional
public java.lang.Object getQueueSize();
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property queueSize: [Advanced] For parallel and grid jobs, this specifies the maximum number of subtasks the queue can hold.
Defaults to 10000.
sendChannelOptional
public java.lang.Object getSendChannel();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property sendChannel: The channel for sending alerts.
- For the default channel of the application group, use
default. - For a specific channel for the job, use
sms,mail,phone, orwebhook.
successNoticeEnableOptional
public java.lang.Object getSuccessNoticeEnable();
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property successNoticeEnable: Whether success notice is enabled for the job.
taskAttemptIntervalOptional
public java.lang.Object getTaskAttemptInterval();
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property taskAttemptInterval: [Advanced] For parallel and grid jobs, this specifies the retry interval in seconds for a failed subtask.
Defaults to 0.
taskMaxAttemptOptional
public java.lang.Object getTaskMaxAttempt();
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property taskMaxAttempt: [Advanced] For parallel and grid jobs, this specifies the maximum number of retries for a failed subtask.
Defaults to 0.
timeExpressionOptional
public java.lang.Object getTimeExpression();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property timeExpression: The time expression, which depends on the value of TimeType.
- cron: A standard cron expression.
- api: No time expression is required.
- fixed_rate: A fixed interval in seconds. For example, a value of 30 triggers the job every 30 seconds.
- second_delay: A fixed delay in seconds before the job is executed. Valid values: 1 to 60.
- one_time: A specific time in
yyyy-MM-dd HH:mm:ssformat or a Unix timestamp in milliseconds. Example: "2022-10-10 10:10:00".
timeoutOptional
public java.lang.Object getTimeout();
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property timeout: The timeout threshold in seconds.
Defaults to 7200.
timeoutEnableOptional
public java.lang.Object getTimeoutEnable();
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property timeoutEnable: Specifies whether to enable timeout alerts.
Valid values:
- true: Enables timeout alerts.
- false: Disables timeout alerts.
timeoutKillEnableOptional
public java.lang.Object getTimeoutKillEnable();
- Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable
Property timeoutKillEnable: Specifies whether to terminate the job upon timeout.
Valid values:
- true: Terminates the job if it times out.
- false: The job is not terminated if it times out.
timezoneOptional
public java.lang.Object getTimezone();
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property timezone: The timezone of the job.
xAttrsOptional
public java.lang.Object getXAttrs();
- Type: com.aliyun.ros.cdk.core.IResolvable OR java.util.Map
Property xAttrs: This parameter is required for k8s jobs.
For job tasks: {"resource":"job"}
For shell tasks: {"image":"busybox","resource":"shell"}
.