All Products
Search
Document Center

Auto Scaling:Create scheduled tasks

Last Updated:Nov 28, 2023

If your business has specific patterns and you can predict your business workload changes, you can create scheduled tasks to prepare sufficient computing resources before the peak hours arrive and release idle computing resources after peak hours. This helps you run your business without interruption and minimize resource costs.

Background information

A scheduled task allows you to specify a specific point of time for a scaling rule to be executed. This enables the automatic scaling of computing resources. For more information, see Overview.

Create scheduled tasks

You can create only a limited number of scheduled tasks within an Alibaba Cloud account in a region. To view the quota of scheduled tasks that you can create in a region, go to Quota Center.

  1. Log on to the Auto Scaling console.
  2. In the left-side navigation pane, choose Scaling Tasks > Scheduled Tasks.
  3. In the top navigation bar, select the region where Auto Scaling is activated.
  4. Click Create Scheduled Task.

  5. In the Create Scheduled Task dialog box, configure parameters based on your business requirements.

    The following table describes the parameters.

    Parameter

    Description

    Task Name

    The name of the scheduled task that you want to create.

    The name must be 2 to 64 characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter or a digit.

    Description

    The description of the scheduled task that you want to create. This parameter is optional.

    The description must be 2 to 200 characters in length. You can describe the purpose of the task in the description.

    Executed At

    The point in time at which the scheduled task is executed.

    Scaling Group

    The scaling group in which you want to create the scheduled task. Select an existing scaling group. For more information, see Overview.

    Scaling Method

    You can select Select Existing Scaling Rule or Configure Number of Instances in Scaling Group.

    • If you set the Scaling Method parameter to Select Existing Scaling Rule, you must select an existing simple scaling rule.

    • If you set the Scaling Method parameter to Configure Number of Instances in Scaling Group, you must specify a maximum number, a minimum number, or an expected number of instances.

      Note
      • If you did not configure the Expected Number of Instances parameter when you created the selected scaling group, you can configure only the Maximum Instances and Minimum Instances parameters when you create the scaling rule.

      • If you configured the Expected Number of Instances parameter when you created the selected scaling group, you must configure the Maximum Instances, Minimum Instances, and Expected Instances parameters at the same time. Otherwise, scaling activities that are triggered by the scheduled task will fail.

    Simple Scaling Rule

    This parameter is available only if you set the Scaling Method parameter to Select Existing Scaling Rule. Select an existing simple scaling rule. For more information, see Manage scaling rules or CreateScalingRule.

    Retry Interval (Seconds)

    The period of time during which Auto Scaling retries the scheduled task upon failures. This parameter is optional. Valid values: 0 to 1800. Unit: seconds.

    Recurrence

    The cycle during which the scheduled task is repeatedly executed. This parameter is optional. Valid values: Not Set, By Day, By Week, By Month, and Cron Expression.

    Expired At

    The end time of the cycle during which the scheduled task is repeatedly executed. This parameter is available if you set the Recurrence parameter to By Day, By Week, By Month, or Cron Expression. The first point of time at which the scheduled task is executed must be earlier than the end time of the cycle.

  6. Click OK.

    After you complete the creation, you can go to the Scheduled Tasks page the view the scheduled task. By default, the scheduled task is in the Enabled state. You can disable, modify, or delete the scheduled task based on your business requirements.

Enable or disable scheduled tasks

  • If you temporarily do not need your scheduled task, you can also disable the scheduled task. You can disable only scheduled tasks that are in the Enabled state.

  • You can enable a scheduled task that is in the Disabled state. After you enable the task, the task can be executed at the specified point in time. You can enable only scheduled tasks that are in the Disabled state.

  1. Log on to the Auto Scaling console.
  2. In the left-side navigation pane, choose Scaling Tasks > Scheduled Tasks.
  3. In the top navigation bar, select the region where Auto Scaling is activated.
  4. Find the scheduled task that you want to enable or disable, and click Enable or Disable in the Actions column.

    • Find the scheduled task that you want to enable and click Enable in the Actions column. In the Enable Scheduled Task message, click OK.

    • Find the scheduled task that you want to disable, and click Disable in the Actions column. In the Disable Scheduled Task message, click OK.

Modify or delete scheduled tasks

  • If your scheduled task no longer meets your business requirements, you can modify the parameter settings of the scheduled task.

  • If you no longer require your scheduled task, you can delete the scheduled task.

  1. Log on to the Auto Scaling console.
  2. In the left-side navigation pane, choose Scaling Tasks > Scheduled Tasks.
  3. In the top navigation bar, select the region where Auto Scaling is activated.
  4. On the Scheduled Tasks page, find the scheduled task that you want to modify or delete, and click Edit or Delete in the Actions column.

    Operation

    Step

    Modify a scheduled task

    1. Find the scheduled task that you want to modify and click Edit in the Actions column.

    2. In the Edit Scheduled Task dialog box, modify one or more parameter settings.

      For more information about the configuration items, see Create scheduled tasks.

    3. Click OK.

    Delete a scheduled task

    1. Find the scheduled task that you want to delete and click Delete in the Actions column.

    2. In the Delete Scheduled Task message, click OK.