Skip to content

JobProps

Properties for defining a Job.

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

Initializer

import ros_cdk_schedulerx
ros_cdk_schedulerx.JobProps(
  execute_mode: typing.Union[str, IResolvable],
  group_id: typing.Union[str, IResolvable],
  job_type: typing.Union[str, IResolvable],
  name: typing.Union[str, IResolvable],
  namespace: typing.Union[str, IResolvable],
  time_type: typing.Union[typing.Union[int, float], IResolvable],
  attempt_interval: typing.Union[typing.Union[int, float], IResolvable] = None,
  calendar: typing.Union[str, IResolvable] = None,
  class_name: typing.Union[str, IResolvable] = None,
  consumer_size: typing.Union[typing.Union[int, float], IResolvable] = None,
  contact_info: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, ContactInfoProperty]]] = None,
  content: typing.Union[str, IResolvable] = None,
  data_offset: typing.Union[typing.Union[int, float], IResolvable] = None,
  description: typing.Union[str, IResolvable] = None,
  dispatcher_size: typing.Union[typing.Union[int, float], IResolvable] = None,
  fail_enable: typing.Union[bool, IResolvable] = None,
  fail_times: typing.Union[typing.Union[int, float], IResolvable] = None,
  max_attempt: typing.Union[typing.Union[int, float], IResolvable] = None,
  max_concurrency: typing.Union[typing.Union[int, float], IResolvable] = None,
  miss_worker_enable: typing.Union[bool, IResolvable] = None,
  namespace_source: typing.Union[str, IResolvable] = None,
  page_size: typing.Union[typing.Union[int, float], IResolvable] = None,
  parameters: typing.Union[str, IResolvable] = None,
  priority: typing.Union[typing.Union[int, float], IResolvable] = None,
  queue_size: typing.Union[typing.Union[int, float], IResolvable] = None,
  send_channel: typing.Union[str, IResolvable] = None,
  success_notice_enable: typing.Union[bool, IResolvable] = None,
  task_attempt_interval: typing.Union[typing.Union[int, float], IResolvable] = None,
  task_max_attempt: typing.Union[typing.Union[int, float], IResolvable] = None,
  time_expression: typing.Union[str, IResolvable] = None,
  timeout: typing.Union[typing.Union[int, float], IResolvable] = None,
  timeout_enable: typing.Union[bool, IResolvable] = None,
  timeout_kill_enable: typing.Union[bool, IResolvable] = None,
  timezone: typing.Union[str, IResolvable] = None,
  x_attrs: typing.Union[IResolvable, typing.Mapping[typing.Any]] = None
)

Properties

Name Type Description
execute_mode typing.Union[str, ros_cdk_core.IResolvable] Property executeMode: The execute mode of the job.
group_id typing.Union[str, ros_cdk_core.IResolvable] Property groupId: The group ID of the job.
job_type typing.Union[str, ros_cdk_core.IResolvable] Property jobType: The type of the job.
name typing.Union[str, ros_cdk_core.IResolvable] Property name: The name of the job.
namespace typing.Union[str, ros_cdk_core.IResolvable] Property namespace: The namespace of the job.
time_type typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property timeType: The time type of the job.
attempt_interval typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property attemptInterval: The retry interval for a failed job, in seconds.
calendar typing.Union[str, ros_cdk_core.IResolvable] Property calendar: For a cron job, you can specify a custom calendar.
class_name typing.Union[str, ros_cdk_core.IResolvable] Property className: The fully qualified class name of the job interface.
consumer_size typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property consumerSize: [Advanced] For parallel and grid jobs, this specifies the number of consumer threads per machine for processing subtasks.
contact_info typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, ContactInfoProperty]]] Property contactInfo: The contact information for the job.
content typing.Union[str, ros_cdk_core.IResolvable] Property content: - For a python, shell, or k8s job, this parameter specifies the script content.
data_offset typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property dataOffset: The time offset in seconds for a cron job.
description typing.Union[str, ros_cdk_core.IResolvable] Property description: The description of the job.
dispatcher_size typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property dispatcherSize: [Advanced] For parallel and grid jobs, this specifies the number of threads for dispatching subtasks.
fail_enable typing.Union[bool, ros_cdk_core.IResolvable] Property failEnable: Specifies whether to enable alerts for failed jobs.
fail_times typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property failTimes: The number of consecutive failures that triggers an alert.
max_attempt typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property maxAttempt: The maximum number of retries for a failed job.
max_concurrency typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property maxConcurrency: The maximum number of concurrent job instances.
miss_worker_enable typing.Union[bool, ros_cdk_core.IResolvable] Property missWorkerEnable: Specifies whether to send an alert when no worker is available to run the job.
namespace_source typing.Union[str, ros_cdk_core.IResolvable] Property namespaceSource: This parameter is required only for specific third-party integrations.
page_size typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property pageSize: [Advanced] For parallel and grid jobs, this specifies the number of subtasks retrieved per pull.
parameters typing.Union[str, ros_cdk_core.IResolvable] Property parameters: The parameters of the job.
priority typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property priority: The job priority.
queue_size typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property queueSize: [Advanced] For parallel and grid jobs, this specifies the maximum number of subtasks the queue can hold.
send_channel typing.Union[str, ros_cdk_core.IResolvable] Property sendChannel: The channel for sending alerts.
success_notice_enable typing.Union[bool, ros_cdk_core.IResolvable] Property successNoticeEnable: Whether success notice is enabled for the job.
task_attempt_interval typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property taskAttemptInterval: [Advanced] For parallel and grid jobs, this specifies the retry interval in seconds for a failed subtask.
task_max_attempt typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property taskMaxAttempt: [Advanced] For parallel and grid jobs, this specifies the maximum number of retries for a failed subtask.
time_expression typing.Union[str, ros_cdk_core.IResolvable] Property timeExpression: The time expression, which depends on the value of TimeType.
timeout typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property timeout: The timeout threshold in seconds.
timeout_enable typing.Union[bool, ros_cdk_core.IResolvable] Property timeoutEnable: Specifies whether to enable timeout alerts.
timeout_kill_enable typing.Union[bool, ros_cdk_core.IResolvable] Property timeoutKillEnable: Specifies whether to terminate the job upon timeout.
timezone typing.Union[str, ros_cdk_core.IResolvable] Property timezone: The timezone of the job.
x_attrs typing.Union[ros_cdk_core.IResolvable, typing.Mapping[typing.Any]] Property xAttrs: This parameter is required for k8s jobs.
For job tasks: {"resource":"job"}
For shell tasks: {"image":"busybox","resource":"shell"}

.

execute_modeRequired

execute_mode: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property executeMode: The execute mode of the job.


group_idRequired

group_id: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property groupId: The group ID of the job.


job_typeRequired

job_type: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property jobType: The type of the job.


nameRequired

name: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property name: The name of the job.


namespaceRequired

namespace: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property namespace: The namespace of the job.


time_typeRequired

time_type: typing.Union[typing.Union[int, float], IResolvable]
  • Type: typing.Union[typing.Union[int, float], 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


attempt_intervalOptional

attempt_interval: typing.Union[typing.Union[int, float], IResolvable]
  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

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

Defaults to 30.


calendarOptional

calendar: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

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


class_nameOptional

class_name: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

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

Required for java jobs.


consumer_sizeOptional

consumer_size: typing.Union[typing.Union[int, float], IResolvable]
  • Type: typing.Union[typing.Union[int, float], 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.


contact_infoOptional

contact_info: typing.Union[IResolvable, typing.List[typing.Union[IResolvable, ContactInfoProperty]]]
  • Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_core.IResolvable, ContactInfoProperty]]]

Property contactInfo: The contact information for the job.

This parameter is deprecated.


contentOptional

content: typing.Union[str, IResolvable]
  • Type: typing.Union[str, 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"}

data_offsetOptional

data_offset: typing.Union[typing.Union[int, float], IResolvable]
  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

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


descriptionOptional

description: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property description: The description of the job.


dispatcher_sizeOptional

dispatcher_size: typing.Union[typing.Union[int, float], IResolvable]
  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

Property dispatcherSize: [Advanced] For parallel and grid jobs, this specifies the number of threads for dispatching subtasks.

Defaults to 5.


fail_enableOptional

fail_enable: typing.Union[bool, IResolvable]
  • Type: typing.Union[bool, ros_cdk_core.IResolvable]

Property failEnable: Specifies whether to enable alerts for failed jobs.

Valid values:

  • true: Enables failure alerts.
  • false: Disables failure alerts.

fail_timesOptional

fail_times: typing.Union[typing.Union[int, float], IResolvable]
  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

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


max_attemptOptional

max_attempt: typing.Union[typing.Union[int, float], IResolvable]
  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

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

Defaults to 0.


max_concurrencyOptional

max_concurrency: typing.Union[typing.Union[int, float], IResolvable]
  • Type: typing.Union[typing.Union[int, float], 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.


miss_worker_enableOptional

miss_worker_enable: typing.Union[bool, IResolvable]
  • Type: typing.Union[bool, 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.

namespace_sourceOptional

namespace_source: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

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


page_sizeOptional

page_size: typing.Union[typing.Union[int, float], IResolvable]
  • Type: typing.Union[typing.Union[int, float], 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

parameters: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property parameters: The parameters of the job.


priorityOptional

priority: typing.Union[typing.Union[int, float], IResolvable]
  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

Property priority: The job priority.

Valid values:

  • 1: Low
  • 5: Medium
  • 10: High
  • 15: Very High

queue_sizeOptional

queue_size: typing.Union[typing.Union[int, float], IResolvable]
  • Type: typing.Union[typing.Union[int, float], 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.


send_channelOptional

send_channel: typing.Union[str, IResolvable]
  • Type: typing.Union[str, 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.

success_notice_enableOptional

success_notice_enable: typing.Union[bool, IResolvable]
  • Type: typing.Union[bool, ros_cdk_core.IResolvable]

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


task_attempt_intervalOptional

task_attempt_interval: typing.Union[typing.Union[int, float], IResolvable]
  • Type: typing.Union[typing.Union[int, float], 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.


task_max_attemptOptional

task_max_attempt: typing.Union[typing.Union[int, float], IResolvable]
  • Type: typing.Union[typing.Union[int, float], 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.


time_expressionOptional

time_expression: typing.Union[str, IResolvable]
  • Type: typing.Union[str, 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

timeout: typing.Union[typing.Union[int, float], IResolvable]
  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

Property timeout: The timeout threshold in seconds.

Defaults to 7200.


timeout_enableOptional

timeout_enable: typing.Union[bool, IResolvable]
  • Type: typing.Union[bool, ros_cdk_core.IResolvable]

Property timeoutEnable: Specifies whether to enable timeout alerts.

Valid values:

  • true: Enables timeout alerts.
  • false: Disables timeout alerts.

timeout_kill_enableOptional

timeout_kill_enable: typing.Union[bool, IResolvable]
  • Type: typing.Union[bool, 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

timezone: typing.Union[str, IResolvable]
  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property timezone: The timezone of the job.


x_attrsOptional

x_attrs: typing.Union[IResolvable, typing.Mapping[typing.Any]]
  • Type: typing.Union[ros_cdk_core.IResolvable, typing.Mapping[typing.Any]]

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

.