execute 1 batch-file autodiagnose.bat

Function

The execute 1 batch-file autodiagnose.bat command configures batch file execution for a maintenance assistant.

By default, no task is configured for a maintenance assistant.

Format

execute 1 batch-file autodiagnose.bat [ parameter ]

Parameters

Parameter Description Value
parameter

Specifies the script arguments.

The value is an integer ranging from 1 to 100.

Views

Maintenance assistant task view

Default Level

3: Management level

Task Name and Operations

Task Name Operations
cli write

Usage Guidelines

Usage Scenario

To configure a device to automatically run a large number of commands when a specific condition is met, users can enable batch file execution for a maintenance assistant in the OPS.

After a maintenance assistant is created, the assistant must be configured with tasks. Each maintenance assistant can be configured with at most one batch file with the size not greater than 1 MB. The configuration modification in the script takes effect immediately and does not require committing.

When users configure the execute command, the OPS checks whether the file name extension is .bat but does not verify the file contents.

Prerequisites

The assistant command has been run in the system view to create a maintenance assistant.

The ops install file command has been run to save the batch file in the /user/bat directory.

Precautions

  • The absolute path of the file must be specified.
  • Add the commit command in the batch file for the commands that need to be committed. Otherwise, the batch file does not take effect.
  • When users configure the execute command, the OPS checks whether the file name extension is .bat but does not verify the file contents.
  • After the execute 1 batch-file autodiagnose.bat command is run, the command execution automatically proceeds in machine-to-machine mode (Y is automatically entered). Intelligent rollback is not supported, and you must run the quit command to exit the current view before entering another view.

In VS mode, this command is supported only by the admin VS.

Example

# Configure batch file execution for a maintenance assistant.
<HUAWEI> ops install file batch.bat
<HUAWEI> system-view
[~HUAWEI] ops
[~HUAWEI-ops] assistant task
[*HUAWEI-assistant-task] execute 1 batch-file autodiagnose.bat
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >