All Products
Search
Document Center

Elastic Compute Service:Modify the execution information of Cloud Assistant tasks

Last Updated:Apr 24, 2024

If a task that you created for a command does not meet your business requirements, you can modify the execution information of the task, such as modifying the command content and scheduled execution mode and adding Elastic Compute Service (ECS) or managed instances to the task. This topic describes how to modify the execution information of a task on the ECS Cloud Assistant page in the ECS console.

Limits

You can modify the execution information of a task only if the following requirements are met:

  • The Execution Plan parameter of the task is set to Run on Schedule, After the next startup of the system, or After each system startup.

  • The task is in one of the following states:

    • Pending: The command is being verified or sent. If the task is in the Pending state on at least one instance, the overall state of the task is Pending.

    • Running: The command is being run on the instances. If the task is in the Running state on at least one instance, the overall state of the task is Running.

    • Scheduled: The command that is set to run on a schedule is sent and waiting to be run. If the task is in the Scheduled state on at least one instance, the overall state of the task is Scheduled.

    • Stopping: The task is being stopped. If the task is in the Stopping state on at least one instance, the overall state of the task is Stopping.

  • The ECS instances or managed instances that are associated with the task meet the following requirements:

    • The instances are in the Running (Running) state.

    • Cloud Assistant Agent is installed on the instances. For more information, see Install Cloud Assistant Agent.

    • The installed version of Cloud Assistant Agent is one of the following versions or later. This requirement does not apply if you add only ECS instances or managed instances to the task.

      • Linux: 2.2.3.541

      • Windows: 2.1.3.541

        If the InvalidOperation.CloudAssistantVersionUnsupported error code is returned after you modify the execution information of a task, update Cloud Assistant Agent to the most recent version. For more information, see Upgrade or disable upgrades for Cloud Assistant Agent.

  • The total number of instances after you add ECS instances or managed instances to a scheduled task cannot exceed 100.

  • If you modify the command content (CommandContent) and call the InvokeCommand operation or call the RunCommand operation with the KeepCommand parameter set to true, a new command is created and retained and counts against the Cloud Assistant command quota.

  • You can retain 500 to 50,000 Cloud Assistant commands in an Alibaba Cloud region. This quota may increase based on your ECS usage. You can also apply for a quota increase. For information about how to view and increase resource quotas, see Manage quotas.

    Note

    You can also call the DescribeAccountAttributes operation with AttributeName.N set to max-axt-command-count to query the maximum number of Cloud Assistant commands that you can retain in a region.

  • If the task is created to run a common Cloud Assistant command, you cannot modify the command content (CommandContent).

  • If you use a Resource Access Management (RAM) user, the RAM user is granted the required permissions before you can modify the execution information of a task. For more information, see the Permissions to modify the execution information of scheduled tasks section in the "Use RAM to implement permission control" topic.

Procedure

  1. Log on to the ECS console.

  2. In the left-side navigation pane, choose Maintenance & Monitoring > Cloud Assistant.

  3. In the top navigation bar, select the region and resource group to which the resource belongs. 地域

  4. Click the Command Execution Result tab, find the task whose execution information you want to modify, and then click Modify Execution Information in the Actions column.

    image

  5. In the Modify Execution Information panel, modify the execution parameters.

    1. For the Command content parameter, turn on or off Modify Command Content.

      If you turn on Modify Command Content, you can modify the command content, turn on Use Parameters to enable the custom parameter feature, and then specify custom parameters.

    2. Change the value of the Execution Schedule parameter and then specify the interval or time at which or the schedule on which you want to run the command.

      Note

      If you set the Execution Plan parameter to After the next startup of the system or After each system startup when you created the task, the Execution Schedule parameter is unavailable in the Modify Execution Information panel.

      Valid value for the Execution Schedule parameter

      Description

      Run at Fixed Interval (Rate Expression)

      Configure the Execution Frequency parameter to specify the interval at which you want to run the command. The value can be anywhere from 60 seconds to 7 days and must be longer than the timeout period that you specified when you created the task.

      Run Only Once at Specified Time

      Specify a point in time and a time zone to run the command only once.

      Run on Clock-based Schedule (Cron Expression)

      Configure the Execution Frequency parameter to specify the schedule on which you want to run the command. The interval between command executions must be at least 10 seconds and no shorter than the timeout period that you specified when you created the task.

    3. In the Select Instance and Select Managed Instances sections, select the instances that you want to add to the task.

  6. Click Modification.

    After the execution information of the task is modified, the task is executed based on the new information.

Reference

ModifyInvocationAttribute