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