Skip to content

JobProps

Properties for defining a Job.

See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-schedulerx-job

Initializer

import { JobProps } from '@alicloud/ros-cdk-schedulerx'
const jobProps: JobProps = { ... }

Properties

Name Type Description
executeMode string | @alicloud/ros-cdk-core.IResolvable Property executeMode: The execute mode of the job.
groupId string | @alicloud/ros-cdk-core.IResolvable Property groupId: The group ID of the job.
jobType string | @alicloud/ros-cdk-core.IResolvable Property jobType: The type of the job.
name string | @alicloud/ros-cdk-core.IResolvable Property name: The name of the job.
namespace string | @alicloud/ros-cdk-core.IResolvable Property namespace: The namespace of the job.
timeType number | @alicloud/ros-cdk-core.IResolvable Property timeType: The time type of the job.
attemptInterval number | @alicloud/ros-cdk-core.IResolvable Property attemptInterval: The retry interval for a failed job, in seconds.
calendar string | @alicloud/ros-cdk-core.IResolvable Property calendar: For a cron job, you can specify a custom calendar.
className string | @alicloud/ros-cdk-core.IResolvable Property className: The fully qualified class name of the job interface.
consumerSize number | @alicloud/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 @alicloud/ros-cdk-core.IResolvable | @alicloud/ros-cdk-core.IResolvable | ContactInfoProperty[] Property contactInfo: The contact information for the job.
content string | @alicloud/ros-cdk-core.IResolvable Property content: - For a python, shell, or k8s job, this parameter specifies the script content.
dataOffset number | @alicloud/ros-cdk-core.IResolvable Property dataOffset: The time offset in seconds for a cron job.
description string | @alicloud/ros-cdk-core.IResolvable Property description: The description of the job.
dispatcherSize number | @alicloud/ros-cdk-core.IResolvable Property dispatcherSize: [Advanced] For parallel and grid jobs, this specifies the number of threads for dispatching subtasks.
failEnable boolean | @alicloud/ros-cdk-core.IResolvable Property failEnable: Specifies whether to enable alerts for failed jobs.
failTimes number | @alicloud/ros-cdk-core.IResolvable Property failTimes: The number of consecutive failures that triggers an alert.
maxAttempt number | @alicloud/ros-cdk-core.IResolvable Property maxAttempt: The maximum number of retries for a failed job.
maxConcurrency number | @alicloud/ros-cdk-core.IResolvable Property maxConcurrency: The maximum number of concurrent job instances.
missWorkerEnable boolean | @alicloud/ros-cdk-core.IResolvable Property missWorkerEnable: Specifies whether to send an alert when no worker is available to run the job.
namespaceSource string | @alicloud/ros-cdk-core.IResolvable Property namespaceSource: This parameter is required only for specific third-party integrations.
pageSize number | @alicloud/ros-cdk-core.IResolvable Property pageSize: [Advanced] For parallel and grid jobs, this specifies the number of subtasks retrieved per pull.
parameters string | @alicloud/ros-cdk-core.IResolvable Property parameters: The parameters of the job.
priority number | @alicloud/ros-cdk-core.IResolvable Property priority: The job priority.
queueSize number | @alicloud/ros-cdk-core.IResolvable Property queueSize: [Advanced] For parallel and grid jobs, this specifies the maximum number of subtasks the queue can hold.
sendChannel string | @alicloud/ros-cdk-core.IResolvable Property sendChannel: The channel for sending alerts.
successNoticeEnable boolean | @alicloud/ros-cdk-core.IResolvable Property successNoticeEnable: Whether success notice is enabled for the job.
taskAttemptInterval number | @alicloud/ros-cdk-core.IResolvable Property taskAttemptInterval: [Advanced] For parallel and grid jobs, this specifies the retry interval in seconds for a failed subtask.
taskMaxAttempt number | @alicloud/ros-cdk-core.IResolvable Property taskMaxAttempt: [Advanced] For parallel and grid jobs, this specifies the maximum number of retries for a failed subtask.
timeExpression string | @alicloud/ros-cdk-core.IResolvable Property timeExpression: The time expression, which depends on the value of TimeType.
timeout number | @alicloud/ros-cdk-core.IResolvable Property timeout: The timeout threshold in seconds.
timeoutEnable boolean | @alicloud/ros-cdk-core.IResolvable Property timeoutEnable: Specifies whether to enable timeout alerts.
timeoutKillEnable boolean | @alicloud/ros-cdk-core.IResolvable Property timeoutKillEnable: Specifies whether to terminate the job upon timeout.
timezone string | @alicloud/ros-cdk-core.IResolvable Property timezone: The timezone of the job.
xAttrs @alicloud/ros-cdk-core.IResolvable | {[ key: string ]: any} Property xAttrs: This parameter is required for k8s jobs.
For job tasks: {"resource":"job"}
For shell tasks: {"image":"busybox","resource":"shell"}

.

executeModeRequired

public readonly executeMode: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property executeMode: The execute mode of the job.


groupIdRequired

public readonly groupId: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property groupId: The group ID of the job.


jobTypeRequired

public readonly jobType: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property jobType: The type of the job.


nameRequired

public readonly name: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property name: The name of the job.


namespaceRequired

public readonly namespace: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property namespace: The namespace of the job.


timeTypeRequired

public readonly timeType: number | IResolvable;
  • Type: number | @alicloud/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 readonly attemptInterval: number | IResolvable;
  • Type: number | @alicloud/ros-cdk-core.IResolvable

Property attemptInterval: The retry interval for a failed job, in seconds.

Defaults to 30.


calendarOptional

public readonly calendar: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property calendar: For a cron job, you can specify a custom calendar.


classNameOptional

public readonly className: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property className: The fully qualified class name of the job interface.

Required for java jobs.


consumerSizeOptional

public readonly consumerSize: number | IResolvable;
  • Type: number | @alicloud/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 readonly contactInfo: IResolvable | IResolvable | ContactInfoProperty[];
  • Type: @alicloud/ros-cdk-core.IResolvable | @alicloud/ros-cdk-core.IResolvable | ContactInfoProperty[]

Property contactInfo: The contact information for the job.

This parameter is deprecated. <\/notice>


contentOptional

public readonly content: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property content: - For a python, shell, or k8s job, this parameter specifies the script content.

For a go job, the content must be in the following format: {"jobName":"HelloWorld"}


dataOffsetOptional

public readonly dataOffset: number | IResolvable;
  • Type: number | @alicloud/ros-cdk-core.IResolvable

Property dataOffset: The time offset in seconds for a cron job.


descriptionOptional

public readonly description: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property description: The description of the job.


dispatcherSizeOptional

public readonly dispatcherSize: number | IResolvable;
  • Type: number | @alicloud/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 readonly failEnable: boolean | IResolvable;
  • Type: boolean | @alicloud/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 readonly failTimes: number | IResolvable;
  • Type: number | @alicloud/ros-cdk-core.IResolvable

Property failTimes: The number of consecutive failures that triggers an alert.


maxAttemptOptional

public readonly maxAttempt: number | IResolvable;
  • Type: number | @alicloud/ros-cdk-core.IResolvable

Property maxAttempt: The maximum number of retries for a failed job.

Defaults to 0.


maxConcurrencyOptional

public readonly maxConcurrency: number | IResolvable;
  • Type: number | @alicloud/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 readonly missWorkerEnable: boolean | IResolvable;
  • Type: boolean | @alicloud/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 readonly namespaceSource: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property namespaceSource: This parameter is required only for specific third-party integrations.


pageSizeOptional

public readonly pageSize: number | IResolvable;
  • Type: number | @alicloud/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 readonly parameters: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property parameters: The parameters of the job.


priorityOptional

public readonly priority: number | IResolvable;
  • Type: number | @alicloud/ros-cdk-core.IResolvable

Property priority: The job priority.

Valid values: - 1: Low - 5: Medium - 10: High - 15: Very High


queueSizeOptional

public readonly queueSize: number | IResolvable;
  • Type: number | @alicloud/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 readonly sendChannel: string | IResolvable;
  • Type: string | @alicloud/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, or webhook.


successNoticeEnableOptional

public readonly successNoticeEnable: boolean | IResolvable;
  • Type: boolean | @alicloud/ros-cdk-core.IResolvable

Property successNoticeEnable: Whether success notice is enabled for the job.


taskAttemptIntervalOptional

public readonly taskAttemptInterval: number | IResolvable;
  • Type: number | @alicloud/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 readonly taskMaxAttempt: number | IResolvable;
  • Type: number | @alicloud/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 readonly timeExpression: string | IResolvable;
  • Type: string | @alicloud/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:ss format or a Unix timestamp in milliseconds. Example: "2022-10-10 10:10:00".


timeoutOptional

public readonly timeout: number | IResolvable;
  • Type: number | @alicloud/ros-cdk-core.IResolvable

Property timeout: The timeout threshold in seconds.

Defaults to 7200.


timeoutEnableOptional

public readonly timeoutEnable: boolean | IResolvable;
  • Type: boolean | @alicloud/ros-cdk-core.IResolvable

Property timeoutEnable: Specifies whether to enable timeout alerts.

Valid values: - true: Enables timeout alerts. - false: Disables timeout alerts.


timeoutKillEnableOptional

public readonly timeoutKillEnable: boolean | IResolvable;
  • Type: boolean | @alicloud/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 readonly timezone: string | IResolvable;
  • Type: string | @alicloud/ros-cdk-core.IResolvable

Property timezone: The timezone of the job.


xAttrsOptional

public readonly xAttrs: IResolvable | {[ key: string ]: any};
  • Type: @alicloud/ros-cdk-core.IResolvable | {[ key: string ]: any}

Property xAttrs: This parameter is required for k8s jobs.
For job tasks: {"resource":"job"}
For shell tasks: {"image":"busybox","resource":"shell"}

.