You can run a cloud assistant command on one or more instances. The command execution status and corresponding results for cloud assistant commands run on each instance do not impact the execution results of other instances. You can also configure an execution interval for each cloud assistant command as required.

Limits

  • You can run a maximum of 500 cloud assistant commands in each Alibaba Cloud region per day.
  • You can run a command on a maximum of 50 instances at a time.
  • The status of the target instance or instances must be Running.
  • The target instance or instances must have cloud assistant client installed.
  • The target instance or instances network type must be VPC-Connected.
  • The period for running cloud assistant commands cannot be less than 10 seconds.
  • The scheduled time for periodic command execution is set to China Standard Time (UTC +08:00) based on the system time obtained from the ECS instances. Make sure that the time or time zone of your ECS instance is consistent with your requirements.

Run commands

To run a cloud assistant command on the ECS console, follow these steps:

  1. Log on to the ECS console.
  2. In the left-side navigation pane, select Cloud Assistant.
  3. Select the target region.
  4. Search for the Cloud Assistant command you want to run, and then select Execute from the Operation column. In the pop-up window that is displayed, configure the following parameters:
    1. Click View command content to confirm the command contents.
    2. Click Select Instance and perform the following actions:
      1. Select one or more instances.
      2. Click to add the selected instance or instances.
        Note For Windows instances, you can select Bat or PowerShell commands. For Linux instances, you can only select Shell commands. All instances must have the cloud assistant client installed. Otherwise, it cannot be selected.
      3. Click OK.
    3. Select Immediate Execution or Scheduled Execution:
      • Immediate Execution: The cloud assistant will run the command immediately on the instances once.
      • Scheduled Execution: The cron expression will be used to run the command periodically. Enter the required Execution Time. For more information, see Cron expression value description.


  5. Click Execute.

You can also use the ECS API InvokeCommand to execute a cloud assistant command.

Stop command execution

Prerequisite: The command must be a periodic command, or the command must be in Running status.

To stop a command on the ECS console, follow these steps:

  1. Log on to the ECS console.
  2. In the left-side navigation pane, select Cloud Assistant.
  3. Select the target region.
  4. In the Execution Record area, search for the command you want to stop, and select Stop Command from the Operation column.

What to do next

Query execution results and status.