This command executes a specified service based on user-specified information such as the
service name, resource group name, and property values. When the task is executed normally, a
message reporting the task ID is output. The /scheduledate and
/scheduletime options are used to specify the date and time that the service
will be executed. If these options are omitted, the command executes the service
immediately.
submittask
/servicename service-name
[/resourcegroup resource-group-name]
[/taskname task-name]
[/taskdescription task-description]
[/property property-key property-value |
/propertyfile property-file-path]
/user user-ID
{/password password | /passwordfile password-file-path} [/wait | /scheduledate YYYY-MM-DD /scheduletime hh:mm]
- /servicename service-name
- This option specifies the name of the service to be performed.
- The number of possible characters is in the range from 1 to 64 characters.
- /resourcegroup resource-group-name
- This option specifies the name of the resource group that the service to be performed
belongs to.
- If this option is omitted, the resource group associated with the user specified in the
argument is used. However, if more than one resource group is associated with that user, an
error occurs.
- The number of possible characters is in the range from 1 to 63 characters. The possible
characters are half-width alphanumeric characters and _.
- However, a space character is allowed only if you specify the built-in resource group
All Resources.
- /taskname task-name
- This option specifies the name of the task.
- If this option is omitted, the system uses
service-name_YYYYMMDDhhmmss
(where YYYYMMDDhhmmss is the time when the service is performed)
as a default name.
- The number of possible characters is in the range from 1 to 128 characters. The possible
characters are any characters other than the control characters (from \u0000 to \u001F and
from \u007F to \u009F).
- /taskdescription task-description
- This option specifies the description of the task.
- If this option is omitted, the value is not set.
- The number of possible characters is in the range from 1 to 256 characters. The possible
characters are any characters other than the control characters (from \u0000 to \u001F and
from \u007F to \u009F).
- /property property-key
property-value
- This option specifies the property key and value that the service to be performed uses.
The system verifies whether the specified property value is valid according to the service
template specifications.
- For property keys that are not set by this option, the values specified in the
Service Definition dialog box will be used. If values for required
properties are specified in neither the Service Definition dialog box
nor by this option, an error occurs.
- This option and the /propertyfile option cannot be specified at the
same time. If both options are specified, then an error occurs.
- You can use multiple instances of this option to specify multiple property key and value
combinations (format: /property key-1
value-1 /property key-2
value-2 ...). You can specify a maximum of 100
instances of this option.
-
- property-key
This option specifies the property key for the service.
The number of possible characters is in the range from 1 to 128 characters. The
possible characters are half-width alphanumeric characters, -,
_, and ..
If the same property key is specified more than once, then an error occurs.
- property-value
This option specifies the property value for the property key.
Any value containing a space or special character must be enclosed in double quotation
marks (").
- /propertyfile property-file-path
- This option specifies the absolute or relative path to the property file, which defines
the property settings that the service to be performed uses.
- For property keys that are not set in the property file specified by this option, the values
specified in the Service Definition dialog box will be used. If values
for required properties are specified in neither the Service Definition
dialog box nor in the file specified by this option, an error occurs.
- This option and the /property option cannot be specified at the same
time. If both options are specified, then an error occurs.
- The following table shows the format of the property file.
-
Table 8-7 Property file format
| Item |
Rule |
| Location |
Anywhere (However, the user who executes the command must be able to access
it.)
|
| File name |
Any file name |
| Definition format |
property-key=property-value property-key=property-value ... (Each entry must be specified on a separate line.)
|
| Definition example # |
common.targetHost=ajsagthost jp1base.jp1BaseLHostName=lohost common.foreachIPaddress=192.168.1.xx,192.168.1.yy
|
-
- #
- The property value delimiter varies depending on the service template to be used. The
above examples use , as their delimiter.
- The property keys and values must be defined in a single line per property key. The
maximum number of definable combinations of property keys and values is 100 pairs.
- The string until the first appearance of = is considered as a
property key. The string from the character subsequent to the first = to
the line break code (CR+LF) at the end of a line is considered as a property value. It is not
considered whether the property file has a line break code at the end of the file.
- /user user-ID
- This option specifies the user ID for JP1/AO. Make sure that you specify the ID of a user that
is associated with a resource group that the service specified by the
/servicename option belongs to.
- 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.
- /wait
- If this option is specified, the command outputs the task execution result (normal termination
or failure), and then terminates. If the /wait option is not specified,
the command terminates without waiting for the task to terminate. In this case, a message
reporting the task ID is output only when the task execution has started normally. Do not
specify the /wait option together with the
/scheduledate and /scheduletime options. If you do so,
command execution will fail.
- /scheduledate
- If you want to execute the service according to a schedule, specify the date (year, month, and
day) that the service will be executed in the
YYYY-MM-DD
format. In YYYY, specify a four-digit year. In
MM, specify a month number from 1 (or 01) to 12. In
DD, specify a day number from 1 (or 01) to 31. Note that when you
specify the /scheduledate option, you must also specify the
/scheduletime option. The command execution will fail if:
-
- The /scheduletime option is not specified.
- The /wait option is specified.
- The date is specified in an incorrect format.
- The execution time determined by the combination of this option and the
/scheduletime option is earlier than the current time.
- The specified date is not within the range from 1994-01-01 to 2036-12-31.
- /scheduletime
- If you want to execute the service according to a schedule, specify the time (hour and minute)
in the hh:mm format. In
hh, specify the hour from 00 to 23. In
mm, specify the minute from 00 to 59. When you specify the
/scheduletime option, you must also specify the
/scheduledate option. The command execution will fail if:
-
- The /scheduledate option is not specified.
- The /wait option is specified.
- The time is specified in an incorrect format.
- The execution time determined by the combination of this option and the
/scheduledate option is earlier than the current time.
JP1/AO-installation-folder\bin
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.
Before the service can be executed, make sure that the Admin, Develop, Modify, or Submit role is set for the resource group
of that service from
the user group that the user who executes the command belongs to. The command cannot execute a
service in a resource group for which none of these roles are set.
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. |
| 5 |
Communication failed. |
| 6 |
Authentication failed. |
| 7 |
An invalid path is specified. |
| 9 |
The specified path does not exist. |
| 14 |
You do not have permission to execute the command. |
| 130 |
Starting the service failed. |
| 131 |
The property file does not exist. |
| 132 |
The property file has an invalid format. |
| 133 |
The status of the task could not be obtained (when the /wait option is
specified).
|
| 134 |
The task could not be executed (when the /wait option is specified).
|
| 255 |
The command execution has been interrupted due to an error other than the
above.
|
The following commands show examples of how to use the command for each case.
- To execute a service specified by the service name with the property keys and
values:
submittask /servicename service01 /user user01 /password pass01
/property keyA valueA /property keyB "value B"
/property keyC valueC,valueD
- To execute a service specified by the resource group and the service name, with the task
name, task description, and property file:
submittask /servicename service02 /resourcegroup resourceA
/taskname task02 /taskdescription testtask
/propertyfile C:\property /user user02 /password
pass02
- To output the task execution result before the command terminates:
submittask /servicename service03 /user user03 /password pass03
/wait
- To execute a service at the specified time:
submittask /servicename service04 /user user04 /password pass04
/scheduledate 2014-01-01 /scheduletime 15:30
All Rights Reserved. Copyright (C) 2012, 2013,Hitachi,
Ltd.