After creating a cloud assistant command, you can run the command on one or more instances. The command execution status and results for each instance are not influenced by the same command being run on other instances. You can also configure the execution interval for the command.

Limits

  • In one Alibaba Cloud region, you can run a maximum of 500 cloud assistant commands in a single day.
  • You can run a command on a maximum of 50 instances at once.
  • The status of the target instance must be In Progress (Running).
  • The target instance must have cloud assistant client installed.
  • The target instance 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 own expectations.

Run commands

To execute a command on the ECS console, take the following steps:

  1. Log on to the ECS consoleECS console .
  2. Select Cloud Assistant from the left-side navigation pane.
  3. Select a region.
  4. Search for the Cloud Assistant command you want to run. Select Execute from the right-side Actions. In the right-side pop-up window:
    1. Click View Command Content to confirm the command contents.
    2. Click Select Instance. In the pop-up window:
      1. Select one or more instances.
      2. Click to select an instance.
        Note
        Bat or PowerShell commands can only be selected for Windows instances, and Shell commands can only be selected for Linux instances. All instances must have the Cloud Assistant Client installed. Otherwise, the instance cannot be selected even after you click the icon.
      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: Use the cron expression to run the command periodically. Fill in the 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: Either it must be a periodic command, or the command must have a command execution status of Running (Running).

To stop a command on the management console, take the following steps:

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

Next step

Query execution results and status