In the Task page, you specify a command or script that you want to run on the BSM Connector system.
In the BSM Connector user interface, click in the toolbar, then click Event >
Scheduled Task. The scheduled task policy editor opens.
Alternatively, double-click an existing scheduled task policy to edit it.
Click Task.
In Task type, select one of the following options:
By default, the command runs under the same account as the agent is running, which is Local System or root by default.
Command: Type the complete path and extension of the command that you want to run on the BSM Connector system (for example, %OvDataDir%\bin\instrumentation\cleanup.exe
). The file that you specify should exist on the system.
Username: Type the user name under which the command should be run. The user must exist and have permission to run the command on the system. If you specify a non-existent user, the command fails to run.
Password: Specify a password for the user. If the password changes, the policy must be updated and reactivated.
Type the VB script in the window. Alternatively, click Load VB script file from Client to load an existing script.
Tip: Use the policy method Rule.Status
to specify whether the task is successful. For example, to specify that the task has failed (and trigger a failure message), use Rule.Status=False
. (See
Rule Object .)
Note: HP Operations Agent uses a generic Microsoft scripting engine to run VBScript scripts.You can therefore use standard VBScript objects (for example, the FileSystemObject object) in your scripts. Objects that are specific to wscript or cscript (for example, the WScript object) are not supported.
Type the Perl script in the window. Alternatively, click Load VB script file from client to load an existing script.
Tip: Use the policy method $Rule->Status
to specify whether the task is successful. For example, to specify that the task has failed (and trigger a failure message), use $Rule.Status(False)
. (See
Rule Object .)
Note: The agent runs as a service that has no standard input, standard output, or standard error. Therefore, the predefined file handles STDIN, STDOUT, and STDERR are not available for Perl scripts in scheduled task policies. It is also not possible to open file handles that use command pipes or capture the standard output from commands within backticks (`).
Description |
|
---|---|
![]() |
Load <perl / VB Script> from Client Opens a file selection dialog box for you to select the VB or Perl script to load into the policy. |
Task Type |
Type of task:
|
Command |
Complete path and extension of the command that you want to run (for example, By default, the command runs under the same account as the agent is running, which is Local System or root by default. |
Username | User name under which the command should be run. The user must exist and have permission to run the command on the system. If you specify a non-existent user, the command fails to run. |
Password | Password for the user. |
VB Script |
Code that defines the VB script. Instead of typing the script into the field, you can upload an existing script. Tip: Use the policy method Note: HP Operations Agent uses a generic Microsoft scripting engine to run VBScript scripts.You can therefore use standard VBScript objects (for example, the FileSystemObject object) in your scripts. Objects that are specific to wscript or cscript (for example, the WScript object) are not supported. |
Perl Script |
Code that defines the Perl script. Instead of typing the script into the field, you can upload an existing script. Tip: Use the policy method Note: The agent runs as a service that has no standard input, standard output, or standard error. Therefore, the predefined file handles STDIN, STDOUT, and STDERR are not available for Perl scripts in scheduled task policies. It is also not possible to open file handles that use command pipes or capture the standard output from commands within backticks (`). |