How to Run a Command File

The Run Command File action, available through Event Actions... on the Configuration menu, enables PowerChute plus to run an external, executable file when an event occurs. For example, for the Administrative Shutdown event, you might want to stop a running process, or run a batch file or a script.

See your UNIX system's documentation on how to set file permissions.

Use the following steps to configure an event's Run Command File action.

  1. In the "Event Actions" dialog box, select the event from the Events list.

  2. Mark the check-box for the Run Command File action.

  3. Click Options... for the Run Command File action to open the "Run Command File" dialog box.

  4. In the Command File field, enter the complete path and name for the script you want to run when the event occurs.

    In the preceding example, the /bin/powerfail script will run every time the UPS On Battery event occurs.

  5. Use the Wait field to define how longPowerChute plus waits before running the command file (by default, 0 seconds).

    Note:
    PowerChute plus runs the command file only when the event lasts for the defined Wait period. For example, for a setting of 10, administrators are not notified if the event lasts less than 10 seconds.

  6. Click OK to save your changes and exit the dialog box.