Skip to content

ScheduledTaskProps

Properties for defining a ScheduledTask.

See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-ess-scheduledtask

Initializer

import com.aliyun.ros.cdk.ess.ScheduledTaskProps;
ScheduledTaskProps.builder()
    .launchTime(java.lang.String)
    .launchTime(IResolvable)
//  .description(java.lang.String)
//  .description(IResolvable)
//  .desiredCapacity(java.lang.Number)
//  .desiredCapacity(IResolvable)
//  .launchExpirationTime(java.lang.Number)
//  .launchExpirationTime(IResolvable)
//  .maxValue(java.lang.Number)
//  .maxValue(IResolvable)
//  .minValue(java.lang.Number)
//  .minValue(IResolvable)
//  .recurrenceEndTime(java.lang.String)
//  .recurrenceEndTime(IResolvable)
//  .recurrenceType(java.lang.String)
//  .recurrenceType(IResolvable)
//  .recurrenceValue(java.lang.String)
//  .recurrenceValue(IResolvable)
//  .scalingGroupId(java.lang.String)
//  .scalingGroupId(IResolvable)
//  .scheduledAction(java.lang.String)
//  .scheduledAction(IResolvable)
//  .scheduledTaskName(java.lang.String)
//  .scheduledTaskName(IResolvable)
//  .taskEnabled(java.lang.Boolean)
//  .taskEnabled(IResolvable)
    .build();

Properties

Name Type Description
launchTime java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property launchTime: Time point at which the scheduled task is triggered.
description java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property description: Description of the scheduled task, which is 2-200 characters (English or Chinese) long.
desiredCapacity java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property desiredCapacity: The expected number of instances in the scaling group if the scaling method of the scaling group is to specify the number of instances.
launchExpirationTime java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property launchExpirationTime: Time period within which the failed scheduled task is retried.
maxValue java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property maxValue: The maximum number of instances in the scaling group if the scaling method of the scaling group is to specify the number of instances.
minValue java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property minValue: The minimum number of instances in the scaling group if the scaling method of the scaling group is to specify the number of instances.
recurrenceEndTime java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property recurrenceEndTime: The end time of the scheduled task.
recurrenceType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property recurrenceType: The interval at which the scheduled task is repeatedly executed.
recurrenceValue java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property recurrenceValue: Value of the scheduled task to be repeated.
scalingGroupId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property scalingGroupId: The ID of the scaling group whose number of instances is changed when the scheduled task is triggered.
scheduledAction java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property scheduledAction: The scaling rule that you want to execute when the scheduled task is triggered.
scheduledTaskName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property scheduledTaskName: The name of the scheduled task.
taskEnabled java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property taskEnabled: Whether to enable the scheduled task.

launchTimeRequired

public java.lang.Object getLaunchTime();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property launchTime: Time point at which the scheduled task is triggered.

The date format follows the ISO8601 standard and uses UTC time. It is in the format of YYYY-MM-DDThh:mmZ. If RecurrenceType is specified, the time point specified by this attribute is the default time point at which the circle is executed. If RecurrenceType is not specified, the task is executed once on the designated date and time. A time point 90 days after creation or modification cannot be entered.


descriptionOptional

public java.lang.Object getDescription();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property description: Description of the scheduled task, which is 2-200 characters (English or Chinese) long.


desiredCapacityOptional

public java.lang.Object getDesiredCapacity();
  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property desiredCapacity: The expected number of instances in the scaling group if the scaling method of the scaling group is to specify the number of instances.

You must specify the DesiredCapacity parameter when you create a scaling group.


launchExpirationTimeOptional

public java.lang.Object getLaunchExpirationTime();
  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property launchExpirationTime: Time period within which the failed scheduled task is retried.

The default value is 600s. Value range: [0, 21600]


maxValueOptional

public java.lang.Object getMaxValue();
  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property maxValue: The maximum number of instances in the scaling group if the scaling method of the scaling group is to specify the number of instances.


minValueOptional

public java.lang.Object getMinValue();
  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property minValue: The minimum number of instances in the scaling group if the scaling method of the scaling group is to specify the number of instances.


recurrenceEndTimeOptional

public java.lang.Object getRecurrenceEndTime();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property recurrenceEndTime: The end time of the scheduled task.

Specify the time in the ISO 8601 standard in the YYYY-MM-DDThh:mmZ format. The time must be in UTC. You cannot enter a point in time that is later than 365 days from the point in time at which the scheduled task is created.


recurrenceTypeOptional

public java.lang.Object getRecurrenceType();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property recurrenceType: The interval at which the scheduled task is repeatedly executed.

Valid values:

  • Daily: The scheduled task is executed once every specified number of days.
  • Weekly: The scheduled task is executed on each specified day of a week.
  • Monthly: The scheduled task is executed on each specified day of a month.
  • Cron: The scheduled task is executed based on the specified cron expression. You must specify the RecurrenceType and RecurrenceValue parameters at the same time.

recurrenceValueOptional

public java.lang.Object getRecurrenceValue();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property recurrenceValue: Value of the scheduled task to be repeated.

  • Daily: Only one value in the range [1,31] can be filled.
  • Weekly: Multiple values can be filled. The values of Sunday to Saturday are 0 to 6 in sequence. Multiple values shall be separated by a comma ",".
  • Monthly: In the format of A-B. The value range of A and B is 1 to 31, and the B value must be greater than the A value.
  • Cron: A cron expression is written in UTC time and consists of the following fields: minute, hour, day, month, and week. The expression can contain the letters L and W and the following wildcard characters: commas (,), question marks (?), hyphens (-), asterisks (*), number signs (#), and forward slashes (/). RecurrenceType, RecurrenceValue and RecurrenceEndTime must be specified.

scalingGroupIdOptional

public java.lang.Object getScalingGroupId();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property scalingGroupId: The ID of the scaling group whose number of instances is changed when the scheduled task is triggered.

If you specify the ScalingGroupId parameter for a scheduled task, the scaling method of the scheduled task is to specify the number of instances in the scaling group. In this case, you must specify at least one of the MinValue, MaxValue, and DesiredCapacity parameters.

You cannot specify the ScheduledAction and ScalingGroupId parameters at the same time.


scheduledActionOptional

public java.lang.Object getScheduledAction();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property scheduledAction: The scaling rule that you want to execute when the scheduled task is triggered.

Specify the unique identifier of the scaling rule. If you specify the ScheduledAction parameter, you must select an existing scaling rule for the scheduled task.

You cannot specify the ScheduledAction and ScalingGroupId parameters at the same time.


scheduledTaskNameOptional

public java.lang.Object getScheduledTaskName();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property scheduledTaskName: The name of the scheduled task.

The name must be 2 to 64 characters in length and can contain letters, digits, underscores (_), hyphens (-), and periods (.). The name must start with a letter or a digit. The name of the scheduled task must be unique in the region and within the account. By default, the value of the ScheduledTaskId parameter is used.


taskEnabledOptional

public java.lang.Object getTaskEnabled();
  • Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable

Property taskEnabled: Whether to enable the scheduled task.

  • When the parameter is set to true, the task is enabled.
  • When the parameter is set to false, the task is disabled. The default value is true.