HP Systems Insight Manager 7.2 Command Line Interface Guide

Example 17
To create task1, which runs once at the specified date (mm/dd/yy) and time (hh:mm), with the
associated query query1 and tool toolexample that already exists in the database, with the task
type schedule, enter mxtask -c task1 -q query1 -t toolexample -w
Tschedule.Irunonce.D01/02/03.M1:00.
In this example, there are no tool (user) parameters required for the tool being specified, so -A
and -f are not required.
Example 18
To create task1, with the associated query query1 and tool toolexample that already exists in the
database, with the task type add, and the tool parameter data specified in c:\params.xml,
enter mxtask -c task1 -q query1 -t toolexample -w Tadd -f c:\params.xml.
Tool parameters are specified with -f. The filename specifies the path and name of a file that
contains the tool (user) parameter data for the specified tool. The tool parameter data contained
in this file must be of the exact same XML format as stored in the HP SIM database.
Example 19
To create task1, with the associated query query1 and tool toolexample that already exists in the
database, with the task type manual, and the task owner owner1, enter mxtask -c task1 -q
query1 -t toolexample -w Tmanual -o owner1.
In this example, there are no tool (user) parameters required for the tool being specified, so -A
and -f are not required.
Example 20
To create task1, with the associated query query1 and tool toolexample that already exists in the
database, with the task type add, the tool parameter data specified in c:\params.xml, the task
owner owner 1, a standard time filter called Business Hours, enter, mxtask -c task1 -q
query1 -t toolexample -w Tadd -f c:\params.xml -o owner 1 -i Business
Hours.
Tool parameters are specified with -f. The filename specifies the path and name of a file that
contains the tool (user) parameter data for the specified tool. The tool parameter data contained
in this file must be of the exact same XML format as stored in the HP SIM database.
The Task Owner is specified on the command line with -o along with the associated task.
Command line option arguments that contain spaces must be enclosed in double quotation marks.
Example 21
To create a new task based on the XML contents of the file test_file.xml, enter mxtask -cf
test_file.xml.
All required task configuration information must be specified in a predefined task-specific XML
format. See the mxtask(4) manpage for a detailed description of the required XML format. The
general format is shown below.
<?xml version="1.0" encoding="UTF-8"?>
<task-list>
<task name="task name" type="add|remove|manual|schedule"
owner="taskowner" runmode="runnow|runatstartup">
<toolname>tool name</toolname>
<queryname>query name</queryname>
<criticality>true</criticality>
<scheduleinfo interval="x" periodic="x" time="x" day="x" date="x"/>
<timefilter />
<toolparams />
</task>
</task-list>
112 Command descriptions