HP Systems Insight Manager 7.2 Command Line Interface Guide

# mxtask c tname q qname t toolname w sched [A tparams | f tpf.xml]
\ [o towner] [i tfilter]
The c tname option creates a task with name tname.
The q qname option identifies the collection to use for the task, and –t toolname identifies
the name of the tool to execute. Both qname and toolname must exist in HP SIM. If the tool
toolname requires any parameters, then you must use one of the A or f options.
Use the A option to list the task parameters, tparams, on the command line.
Use the –f tpf.xml if the parameters defined in the tpf.xml file. As the file name implies,
the parameters are defined in XML format as defined in the man page mxtask(4).
If you use the –o towner parameter, the new task is owned by towner. The default owner
is the user that is running the mxtask command.
Use the –i tfilter parameter to have the task use the time filter tfilter to define when the task
executes.
The –w sched parameter defines the execution schedule for the task. The general format for
the –w sched parameter is:
-w T<tasktype>.I<intervaltype>.P<periodic>.D<day|date>.M<time>
Where <tasktype> defines the type of task:
add—runs the task when the query criteria are met
remove—runs the task when query criteria are no longer met
manual—runs the task only when manually invoked
schedule—runs the task based on the P and D time definitions
You must use the following options when the sched parameter tasktype is schedule:
I<intervaltype> are the values that you can define in minutes (runs every X minutes), hours
(runs every X hours), days (runs every X days at the specified time), weeks (runs every X weeks
at the specified day and time), months (runs every X months at the specified day and time),
daily (at the specified time), or runonce (at the specified date and time). Here, X is defined
by the P option below.
P<periodic> defines the periodic interval for the task, and can be any number greater than
zero. For example, P3 runs the task every third time.
D<day|date> defines the day or time for task execution, and is only required if the I parameter
is weeks, months, or runonce. For weeks, valid values are the days of the week (sunday,
monday,). For months, valid values range from 1-31, representing a day of the month. For
runonce, the valid date value uses the mm/dd/yy format.
M<time> defines the time for task execution, and is required for all I parameter values except
minutes and hours. The format is hh:mm, using the 24 hour format. For example, 1pm is
represented as 13:00.
Using the c option to create a task can be complicated if all of the options are required to properly
define the task. You can create a task by defining the task in XML format, and use the mxtask
command use the XML definition. The command is:
# mxtask cf taskfile.xml
The XML format for the task is defined in the mxtask(4) man page. The general format of the
XML syntax for the task is:
<?xml version="1.0" encoding="UTF-8"?>
<task-list>
146 Infrastructure management using CLI