JobProps
Properties for defining a Job.
See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-schedulerx-job
Initializer
using AlibabaCloud.SDK.ROS.CDK.Schedulerx;
new JobProps {
object ExecuteMode,
object GroupId,
object JobType,
object Name,
object Namespace,
object TimeType,
object AttemptInterval = null,
object Calendar = null,
object ClassName = null,
object ConsumerSize = null,
object ContactInfo = null,
object Content = null,
object DataOffset = null,
object Description = null,
object DispatcherSize = null,
object FailEnable = null,
object FailTimes = null,
object MaxAttempt = null,
object MaxConcurrency = null,
object MissWorkerEnable = null,
object NamespaceSource = null,
object PageSize = null,
object Parameters = null,
object Priority = null,
object QueueSize = null,
object SendChannel = null,
object SuccessNoticeEnable = null,
object TaskAttemptInterval = null,
object TaskMaxAttempt = null,
object TimeExpression = null,
object Timeout = null,
object TimeoutEnable = null,
object TimeoutKillEnable = null,
object Timezone = null,
object XAttrs = null
};
Properties
| Name | Type | Description |
|---|---|---|
ExecuteMode | object | Property executeMode: The execute mode of the job. |
GroupId | object | Property groupId: The group ID of the job. |
JobType | object | Property jobType: The type of the job. |
Name | object | Property name: The name of the job. |
Namespace | object | Property namespace: The namespace of the job. |
TimeType | object | Property timeType: The time type of the job. |
AttemptInterval | object | Property attemptInterval: The retry interval for a failed job, in seconds. |
Calendar | object | Property calendar: For a cron job, you can specify a custom calendar. |
ClassName | object | Property className: The fully qualified class name of the job interface. |
ConsumerSize | object | Property consumerSize: [Advanced] For parallel and grid jobs, this specifies the number of consumer threads per machine for processing subtasks. |
ContactInfo | object | Property contactInfo: The contact information for the job. |
Content | object | Property content: - For a python, shell, or k8s job, this parameter specifies the script content. |
DataOffset | object | Property dataOffset: The time offset in seconds for a cron job. |
Description | object | Property description: The description of the job. |
DispatcherSize | object | Property dispatcherSize: [Advanced] For parallel and grid jobs, this specifies the number of threads for dispatching subtasks. |
FailEnable | object | Property failEnable: Specifies whether to enable alerts for failed jobs. |
FailTimes | object | Property failTimes: The number of consecutive failures that triggers an alert. |
MaxAttempt | object | Property maxAttempt: The maximum number of retries for a failed job. |
MaxConcurrency | object | Property maxConcurrency: The maximum number of concurrent job instances. |
MissWorkerEnable | object | Property missWorkerEnable: Specifies whether to send an alert when no worker is available to run the job. |
NamespaceSource | object | Property namespaceSource: This parameter is required only for specific third-party integrations. |
PageSize | object | Property pageSize: [Advanced] For parallel and grid jobs, this specifies the number of subtasks retrieved per pull. |
Parameters | object | Property parameters: The parameters of the job. |
Priority | object | Property priority: The job priority. |
QueueSize | object | Property queueSize: [Advanced] For parallel and grid jobs, this specifies the maximum number of subtasks the queue can hold. |
SendChannel | object | Property sendChannel: The channel for sending alerts. |
SuccessNoticeEnable | object | Property successNoticeEnable: Whether success notice is enabled for the job. |
TaskAttemptInterval | object | Property taskAttemptInterval: [Advanced] For parallel and grid jobs, this specifies the retry interval in seconds for a failed subtask. |
TaskMaxAttempt | object | Property taskMaxAttempt: [Advanced] For parallel and grid jobs, this specifies the maximum number of retries for a failed subtask. |
TimeExpression | object | Property timeExpression: The time expression, which depends on the value of TimeType. |
Timeout | object | Property timeout: The timeout threshold in seconds. |
TimeoutEnable | object | Property timeoutEnable: Specifies whether to enable timeout alerts. |
TimeoutKillEnable | object | Property timeoutKillEnable: Specifies whether to terminate the job upon timeout. |
Timezone | object | Property timezone: The timezone of the job. |
XAttrs | object | Property xAttrs: This parameter is required for k8s jobs.For job tasks: {"resource":"job"} For shell tasks: {"image":"busybox","resource":"shell"} . |
ExecuteModeRequired
public object ExecuteMode { get; set; }
- Type: object
Property executeMode: The execute mode of the job.
GroupIdRequired
public object GroupId { get; set; }
- Type: object
Property groupId: The group ID of the job.
JobTypeRequired
public object JobType { get; set; }
- Type: object
Property jobType: The type of the job.
NameRequired
public object Name { get; set; }
- Type: object
Property name: The name of the job.
NamespaceRequired
public object Namespace { get; set; }
- Type: object
Property namespace: The namespace of the job.
TimeTypeRequired
public object TimeType { get; set; }
- Type: object
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 object AttemptInterval { get; set; }
- Type: object
Property attemptInterval: The retry interval for a failed job, in seconds.
Defaults to 30.
CalendarOptional
public object Calendar { get; set; }
- Type: object
Property calendar: For a cron job, you can specify a custom calendar.
ClassNameOptional
public object ClassName { get; set; }
- Type: object
Property className: The fully qualified class name of the job interface.
Required for java jobs.
ConsumerSizeOptional
public object ConsumerSize { get; set; }
- Type: object
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 object ContactInfo { get; set; }
- Type: object
Property contactInfo: The contact information for the job.
This parameter is deprecated.
ContentOptional
public object Content { get; set; }
- Type: object
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 object DataOffset { get; set; }
- Type: object
Property dataOffset: The time offset in seconds for a cron job.
DescriptionOptional
public object Description { get; set; }
- Type: object
Property description: The description of the job.
DispatcherSizeOptional
public object DispatcherSize { get; set; }
- Type: object
Property dispatcherSize: [Advanced] For parallel and grid jobs, this specifies the number of threads for dispatching subtasks.
Defaults to 5.
FailEnableOptional
public object FailEnable { get; set; }
- Type: object
Property failEnable: Specifies whether to enable alerts for failed jobs.
Valid values:
- true: Enables failure alerts.
- false: Disables failure alerts.
FailTimesOptional
public object FailTimes { get; set; }
- Type: object
Property failTimes: The number of consecutive failures that triggers an alert.
MaxAttemptOptional
public object MaxAttempt { get; set; }
- Type: object
Property maxAttempt: The maximum number of retries for a failed job.
Defaults to 0.
MaxConcurrencyOptional
public object MaxConcurrency { get; set; }
- Type: object
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 object MissWorkerEnable { get; set; }
- Type: object
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 object NamespaceSource { get; set; }
- Type: object
Property namespaceSource: This parameter is required only for specific third-party integrations.
PageSizeOptional
public object PageSize { get; set; }
- Type: object
Property pageSize: [Advanced] For parallel and grid jobs, this specifies the number of subtasks retrieved per pull.
Defaults to 100.
ParametersOptional
public object Parameters { get; set; }
- Type: object
Property parameters: The parameters of the job.
PriorityOptional
public object Priority { get; set; }
- Type: object
Property priority: The job priority.
Valid values:
- 1: Low
- 5: Medium
- 10: High
- 15: Very High
QueueSizeOptional
public object QueueSize { get; set; }
- Type: object
Property queueSize: [Advanced] For parallel and grid jobs, this specifies the maximum number of subtasks the queue can hold.
Defaults to 10000.
SendChannelOptional
public object SendChannel { get; set; }
- Type: object
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 object SuccessNoticeEnable { get; set; }
- Type: object
Property successNoticeEnable: Whether success notice is enabled for the job.
TaskAttemptIntervalOptional
public object TaskAttemptInterval { get; set; }
- Type: object
Property taskAttemptInterval: [Advanced] For parallel and grid jobs, this specifies the retry interval in seconds for a failed subtask.
Defaults to 0.
TaskMaxAttemptOptional
public object TaskMaxAttempt { get; set; }
- Type: object
Property taskMaxAttempt: [Advanced] For parallel and grid jobs, this specifies the maximum number of retries for a failed subtask.
Defaults to 0.
TimeExpressionOptional
public object TimeExpression { get; set; }
- Type: object
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 object Timeout { get; set; }
- Type: object
Property timeout: The timeout threshold in seconds.
Defaults to 7200.
TimeoutEnableOptional
public object TimeoutEnable { get; set; }
- Type: object
Property timeoutEnable: Specifies whether to enable timeout alerts.
Valid values:
- true: Enables timeout alerts.
- false: Disables timeout alerts.
TimeoutKillEnableOptional
public object TimeoutKillEnable { get; set; }
- Type: object
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 object Timezone { get; set; }
- Type: object
Property timezone: The timezone of the job.
XAttrsOptional
public object XAttrs { get; set; }
- Type: object
Property xAttrs: This parameter is required for k8s jobs.
For job tasks: {"resource":"job"}
For shell tasks: {"image":"busybox","resource":"shell"}
.