Job Management Partner 1/Automatic Operation GUI and Command Reference

[Contents][Index][Back][Next]


8.6.7 listtasks (outputting the list of tasks)

Description

This command outputs the CSV-formatted list of the tasks or histories.

You can specify an option for the command to output the task information from the Tasks or Task Histories view. In addition, you can specify a period to filter the task information to be output.

Syntax
listtasks
     [/startrange {yyyy-mm-dd|,yyyy-mm-dd|yyyy-mm-dd,yyyy-mm-dd}]
     /output {tasks | histories}
     /file output-file-path
     [/encoding {UTF-8 | Shift_JIS}]
     /user user-ID
     {/password password | /passwordfile password-file-path}
Arguments

/startrange {yyyy-mm-dd|,yyyy-mm-dd|yyyy-mm-dd,yyyy-mm-dd}
This option specifies the start date or scheduled start date of tasks to filter the tasks to be output.
yyyy must have a four-digit year in half-width numeric characters. mm must have a month from 1 (or 01) to 12 in half-width numeric characters. dd must have a day from 1 (or 01) to 31 in half-width numeric characters.
  • yyyy-mm-dd
    This option causes the command to output the tasks that started or are scheduled to start on and after the specified date.
  • ,yyyy-mm-dd
    This option causes the command to output the tasks that started or are scheduled to start on and before the specified date.
  • yyyy-mm-dd,yyyy-mm-dd
    This option causes the command to output the tasks that started or are scheduled to start within the specified period. The date on the right side of , can accept any date on and after the date specified on the left side.
For recurring tasks, tasks scheduled to start up to the next time are output, and any tasks scheduled to start subsequently are not output.
If you want to output waiting tasks, specify a scheduled date and time instead of a start data and time if the tasks are recurring and scheduled tasks. If they are immediate tasks, specify a submitted data and time. You can see the submitted date and time in the Task Details dialog box.
If this option is omitted, all the tasks viewable to users are output.

/output {tasks | histories}
This option specifies which information is output in the list.
  • tasks
    Outputs the list of the tasks from the Tasks view.
  • histories
    Outputs the list of the histories from the Task Histories view.

/file output-file-path
This option specifies the absolute or relative path to the file in which the list is output. An error occurs if the specified file exists.

/encoding {UTF-8 | Shift_JIS}
This option specifies the encoding of the output file. If this option is omitted, the default encoding of the OS is used.

/user user-ID
This option specifies the user ID for JP1/AO.
The number of possible characters is in the range from 1 to 256 characters.
The possible characters are half-width alphanumeric characters, !, #, $, %, &, ', (, ), *, +, -, ., =, @, \, ^, _, and |.
This option is not case sensitive.

/password password
This option specifies the password of the user indicated by the /user option.
You must specify either this option or the /passwordfile option. If both options are specified, or if neither are specified, then you will get an error.
The number of possible characters is in the range from 1 to 256 characters.
The possible characters are the same as those for the /user option.

/passwordfile password-file-path
This option specifies the absolute or relative path to the password file for the user specified in the /user option. You can create a password file by using the encryptpassword command.
You must specify either this option or the /password option. If both options are specified, or if neither are specified, then you will get an error.
Output format

The output items are output in a single line per task in CSV format.

The values for each output item are enclosed in double quotation marks ("). Any double quotation mark (") contained in the value is escaped with another one added in front of the mark.

Table 8-6 Output items in the list of tasks

Output item Description
Task Name Task name
Status Status
Scheduled Start Time Scheduled start date and time
Start Time Start date and time
End Time End date and time
Task Type Task type
Task ID Task ID
Description Task description
Service Name Service name
Resource Group Resource group
Category Service category
Submit User Name User who executed the task
Submission Time Submitted date and time
Recurrence Cycle Recurrence pattern
Recurrence Time Recurrence time
Recurrence Start Day Start date of recurrence
Configuration Type# Configuration type

#
The configuration type is output only if the Admin or Develop role has been set for the target resource groups from the user group that the user belongs to.

The following list shows some examples of file outputs.

"Task Name","Status","Scheduled Start Time","Start Time","End Time","Task Type","Task ID","Description","Service Name","Resource Group","Category","Submit User Name","Submission Time","Recurrence Cycle","Recurrence Time","Recurrence Start Day"
"Virtual server migration_20120822163011","Failed","","2012-08-22 16:30:22","2012-08-22 16:30:32","Immediate task","3448","","Virtual server migration","All Resources","VM_Operations/Management","System","2012-08-22 16:30:22","","",""
"Waiting response input_single plug-in_20120822163002","Completed","","2012-08-22 16:30:07","2012-08-22 16:38:44","Immediate task","3422","","Waiting response input_single plug-in","All Resources","PT/UserResponse","System","2012-08-22 16:30:05","","",""
Located in

JP1/AO-installation-folder\bin

Execute permission

Execute the command as a user with Administrator permissions for the OS. If a user without Administrator permissions executes the command, a message appears asking the user to elevate the permission level.

The Admin, Develop, Modify, or Submit role must be set for the target resource groups from the user group that the user who executes the command belongs to. The command does not output a list of tasks for any resource groups for which none of these roles are set.

Return code

The following table lists the return codes from the command.

Return code Description
0 The command succeeded.
1 The argument is invalid.
2 The command execution has been interrupted.
3 The service status is invalid.
4 One of the other commands is running.
5 Communication failed.
6 Authentication failed.
7 An invalid path is specified.
8 The file with the same name already exists in the output path.
9 The specified path does not exist.
10 The specified path is not accessible.
12 An invalid encoding is specified.
13 Outputting the file failed.
14 You do not have permission to execute the command.
150 Obtaining the list of tasks failed.
151 Obtaining the list of histories failed.
255 The command execution has been interrupted due to an error other than the above.
Example

The following commands show examples of how to use the command for each case.

Related topic