Home  >  Article  >  Operation and Maintenance  >  How to execute the command on one or multiple instances after creating a cloud assistant command

How to execute the command on one or multiple instances after creating a cloud assistant command

坏嘻嘻
坏嘻嘻Original
2018-09-18 17:01:001209browse

The content of this article is about how to execute the command in one or multiple instances after creating the cloud assistant command. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you. help.

Execute commands

After creating a cloud assistant command, you can execute the command in one or multiple instances. The execution status and execution results of multiple instances do not affect each other. You can also set the execution cycle for the command.

Usage Limitations

#In an Alibaba Cloud region, you can execute Cloud Assistant commands up to 500 times per day.

You can select up to 50 instances at one time to execute the command operation.

The status of the target instance must be running.

The target instance must have the Cloud Assistant client installed.

The network type of the target instance must be VPC.

The interval set by the periodic cloud assistant command cannot be less than 10 seconds.

The time base for periodic execution is UTC 08:00, and this time is based on the system time of the instance. You need to ensure that the time or time zone of your ECS instance is consistent with your expected time.

Execute the command

The steps to execute the command on the management console are as follows:

Log in to the ECS management console .

In the left navigation bar, click Cloud Assistant.

Select a region.

Find the cloud assistant command that needs to be executed, click Execute in the operation list on the right, and in the pop-up window on the right:

Click View Command Content to confirm the command content.

Click to select an instance, and in the pop-up window:

Check one or more instances.

Click to select the instance.

Note

Bat or PowerShell commands can only select Windows instances, Shell commands can only select Linux instances, and the instance must have the Cloud Assistant client installed. Otherwise, the instance cannot be selected after clicking the icon.

Click OK.

Select immediate execution or scheduled execution:

Immediate execution: The cloud assistant command can be executed once in the instance.

Scheduled execution: Use Cron expressions to set commands as periodic tasks. Fill in the execution time. For more details, please refer to the Cron expression value description.

How to execute the command on one or multiple instances after creating a cloud assistant command

Click to execute.

You can also use ECS API InvokeCommand to execute cloud assistant commands.

Stop executing the command

Prerequisite: The command execution status must be running (Running) or a periodic command.

The steps to stop the command on the management console are as follows:

Log in to the ECS management console.

In the left navigation bar, select Cloud Assistant.

Select a region.

In the execution record area, find the command that needs to be stopped, and click to stop execution in the operation bar.

How to execute the command on one or multiple instances after creating a cloud assistant command

Next step

Query execution results and status

The above is the detailed content of How to execute the command on one or multiple instances after creating a cloud assistant command. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn