In a flexible management environment, you can use the wsadmin tool to submit administrative jobs to the job manager. This topic provides detailed information about the administrative jobs, the job parameters, and sample command syntax.
In a flexible management environment, you can configure an administrative agent and job manager to submit jobs to multiple nodes or node groups in your configuration. Then, you can submit administrative jobs to queue jobs across your managed environment. Each administrative job has a corresponding job type, which defines the required parameters to submit the job. You can use the commands in the AdministrativeJobs command group to submit administrative jobs to the job manager.
You can submit administrative jobs to manage your applications.
Parameter | Description | Type |
---|---|---|
jobType | Specifies the type of job to perform. Many job types exist in the flexible management environment including application management, product maintenance, configuration, and application server runtime control jobs. | String |
targetList | Specifies one or more managed nodes where the job runs. | String |
jobParams | Specifies configuration information in addition to the job type and target in order to run the job. Job parameters are specific to each job type. | String |
Parameter | Description | Type |
---|---|---|
username | Specifies the user name to use at the target nodes when the job is run. If the user name and password are not specified, and security is enabled, the user ID at the job manager is used. | String |
password | Specifies the password for the user name to use at the target node(s) when the job is run. If the user name and password are not specified, and security is enabled the user ID at the job manager is used. | String |
description | Specifies a description for the job. | String |
activationDateTime | Specifies the date and time to activate the job in the format "2006-05-03T10:30:45-0000". The -0000 section of the activationDateTime parameter value represents RFC 822 format. You can specify Z as a shortcut for Greenwich Mean Time (GMT), such as "2006-05-03T10:30:45Z". If you do not specify the time zone, the system uses the time zone of the job manager. | String |
expirationDateTime | Specifies the expiration date for the job, in the format "2006-05-03T10:30:45-0000". The -0000 section of the activationDateTime parameter value represents RFC 822 format. You can specify "Z" as a shortcut for Greenwich Mean Time (GMT), such as "2006-05-03T10:30:45Z". If you do not specify the time zone, the system uses the time zone of the job manager. | String |
executionWindow | Specifies the recurring interval, if any, for the job. | String |
executionWindowUnit | Specifies the unit of measure for the recurring interval. Valid values include HOURS, DAYS, WEEKS, MONTHS, CONNECT, and ONCE. The default value is HOURS. | String |
Specifies the e-mail address where the system sends job notifications. | String |
Enter wsadmin commands from the bin directory of the job manager profile. This topic shows examples in the Jython scripting language.
Example usage:
AdminTask.submitJob('-jobType installApplication -targetList [Node1 Node2 Node3] -jobParams [applicationName MyApp] -email admin@company.com ')
Interactive mode example usage:
AdminTask.submitJob('-interactive')
Job result example usage:
Running a submitJob command returns a job token such as 124231200726586682. For information on the job token, run a getJobTargetStatus command:
AdminTask.getJobTargetStatus('[-jobToken 124231200726586682]')
Job status results typically progress from DISTRIBUTED to ASYNC_IN_PROGRESS to SUCCEEDED. You might need to run a getJobTargetStatus command more than once, until the result is FAILED, REJECTED, or SUCCEEDED.
By default, a job remains active for one day (24 hours).
The inventory administrative job collects inventory data from the target nodes. This inventory data includes the available job types, and the status of the managed resources, such as applications, and servers, for each node.
Job parameters
None.Example usage
AdminTask.submitJob('-jobType inventory -targetList [Node1 Node2 Node3]')
The status administrative job collects status data from the target nodes. Use this job, instead of the inventory job, if you only want to refresh data on the managed resources, such as applications, and servers, for each node.
Job parameters
None.Example usage
AdminTask.submitJob('-jobType status -targetList [Node1 Node2 Node3]')
You can use the file management jobs to collect, distribute, and remove files. For example, you can submit the collectFile job to transfer a file to the job manager. The distributeFile job transfers a file from the job manager to the target nodes for the job. The removeFile job removes a file that was previously distributed to the target node:
The collectFile administrative job collects a target file and transfers it to the job manager. If the source location is a directory instead of a file, the job recursively zips the directory contents and transfers the resulting compressed format file.
Job parameters
Parameter | Description | Type |
---|---|---|
source | Specifies the source location of the file or directory of interest. The system determines the file location is relative to the profile_root directory of the target node. | String |
destination | Specifies the destination location. The value is relative to a directory named profile_root/config/temp/JobManagerName/jobToken/nodeName. | String |
distributionProvider | Optionally specifies the name of the distribution provider. | String |
Example usage
AdminTask.submitJob('[-jobType collectFile -targetList [Node1] -jobParams [[source logs][destination targetLocationOfFile]]]')
The distributeFile administrative job transfers a file from the job manager to the target nodes for the job. The system stores the file at the target node in preparation for subsequent jobs that will use the file. The installApplication and updateApplication administrative jobs reference the destination that you provide to the distributeFile job as the location of the application content on the target node. Additionally, you can use this job to distribute script files and properties-based configuration files.
The file to distribute from the job manager initially must be in the /config/temp/JobManager directory of the job manager profile. Then, the system moves the file into the downloadedContent directory of the administrative agent or deployment manager profile. The destination parameter is relative to the downloadedContent directory and can be a file name or a relative path name. You can use a relative path to create separate subdirectories under the downloadedContent directory to organize downloaded files.
Job parameters
Parameter | Description | Type |
---|---|---|
source | Specifies the source location of the content to distribute. | String |
destination | Specifies the destination location on the target node where the system saves the content. | String |
distributionProvider | Optionally specifies the name of the distribution provider. | String |
Example usage
AdminTask.submitJob('-jobType distributeFile -targetList [Node1 Node2 Node3] -jobParams [[source file:/MyApp.ear][destination MyApp.ear]]')
The removeFile administrative job removes a file that was previously distributed to the target node. The location parameter is relative to the downloadedContent directory, and it should be the same location as the location that was specified for the destination parameter when the file was distributed.
Job parameters
Parameter | Description | Type |
---|---|---|
location | Specifies the location of the file to remove from the target node. Use the destination value from the distributeFile job. | String |
distributionProvider | Optionally specifies the name of the distribution provider. | String |
Example usage
AdminTask.submitJob('-jobType removeFile -targetList [Node1 Node2 Node3] -jobParams [location MyApp.ear]')
You can submit a job to run a wsadmin script on a managed node of the job manager. The managed node can be a deployment manager or an unfederated application server. Before running a wsadmin script on a managed node, transfer the wsadmin script, and any script profile, from the job manager to the managed node using the distributeFile job. Remember any destination value that is specified when distributing the file. Then use the following job to run the wsadmin script. Use the destination value for the scriptFileLocation parameter. If you specified a profile destination value, optionally use the profile destination value for the profileLocation parameter.
The status result of a runWsadminScript job depends on the return code of the script. When the return code is zero, the job is marked as successful. When the return code is a value that is not zero, the job is marked as failed.
Job parameters
Parameter | Description | Type |
---|---|---|
scriptFileLocation | Specifies the location of the script file to run on the managed node. The location is the destination that was given when the file was distributed to the node. | String |
profileLocation | Optionally specifies the location of the profile script to run with the wsadmin script. This parameter corresponds to the -profile parameter of wsadmin. The location is the destination that is specified when the file is distributed to the node. | String |
scriptParameters | Optionally specifies parameters to give to the wsadmin script. | String |
Example usage
AdminTask.submitJob('[-jobType runWsadminScript -targetList [DmgrManagedNodeName] -jobParams [ [scriptFileLocation myScript.py] [profileLocation scriptProfile.py] [scriptParameters [param1 param2]] ]]')
For wsadmin scripts that process multiple keyword-value pairs for command parameters, such as argv[] command parameters, use scriptParameters to specify the keywords and values:
AdminTask.submitJob('[-jobType runWsadminScript -targetList [myNode01] -jobParams [ [scriptFileLocation myScript.py] [scriptParameters [-keyword1 value1 -keyword2 value2]] ]]')
You can use the application management jobs to distribute, install, update, remove, and control applications on the application server. For example, you can submit the distributeFile, installApplication and startApplication jobs to deploy applications in your environment. To remove applications from your environment, submit the stopApplication, uninstallApplication, and removeFile jobs. Use the following application management jobs to administer your application configurations:
The installApplication administrative job installs and binds an application or application element into the target environment. You must run the distributeFile job and distribute the deployable content to the targets before you can install the application.
The installApplication job does not provide a means for providing binding information, or other deployment attributes. If you need that capability, you can use the runWsadminScript, or configureProperties jobs.
Job parameters
Parameter | Description | Type |
---|---|---|
applicationName | Specifies an application name to use to identify the application to install. Often this is the base file name of the enterprise application (for example, MyApp for MyApp.ear), but you can choose any name. | String |
appLocation | Optionally specifies the location of the application
file to install. By default, the installApplication job appends the .ear file
format notation to the application name, and searches for the application
in the default destination location. Thus, if you specify MyApp for applicationName, by default the appLocation is downloadedContent/MyApp.ear of the target managed node. If you specify a value for appLocation, use the destination value that you specified when distributing the application. |
String |
serverName | Optionally specifies the name of the server where the system installs the application. | String |
nodeName | Optionally specifies the node of interest, which identifies the server in a WebSphere® Application Server, Network Deployment cell. | String |
clusterName | Optionally specifies the name of the cluster in which the application is installed. | String |
Example usage
AdminTask.submitJob('-jobType installApplication -targetList [Node1 Node2 Node3] -jobParams [[applicationName MyApp]]')
or:
AdminTask.submitJob('-jobType installApplication -targetList [Node1 Node2 Node3] -jobParams [[applicationName MyApp][appLocation MyApp.ear][clusterName TestCluster]]')
The startApplication administrative job starts a previously installed application on the target node. The system changes the application status to active or RUNNING, loads the application in the run time, and opens the application to receive client requests. This is the last step in the application deployment process.
Job parameters
Parameter | Description | Type |
---|---|---|
applicationName | Specifies the name of the application to start. | String |
Example usage
AdminTask.submitJob('-jobType startApplication -targetList [Node1 Node2 Node3] -jobParams [applicationName MyApp]')
The stopApplication administrative job stops the application on the target node. The system changes the application status to stopped and no longer receives client requests. You can use the startApplication job to restart the application. This is the first step in the application removal process.
Parameter | Description | Type |
---|---|---|
applicationName | Specifies the name of the application to stop. | String |
Example usage
AdminTask.submitJob('-jobType stopApplication -targetList [Node1 Node2 Node3] -jobParams [applicationName MyApp]')
The updateApplication administrative job updates an application or application element in the target environment. You must run the distributeFile job and distribute the deployable content to the targets before you can update the application.
Job parameters
Parameter | Description | Type |
---|---|---|
applicationName | Specifies an application name to use to identify the application to update. Often this is the base file name of the enterprise application (for example, MyApp for MyApp.ear), but you can choose any name. | String |
appLocation | Optionally specifies the location of the application
file to install. By default, the updateApplication job appends the .ear file
format notation to the application name, and searches for the application
in the default destination location. Thus, if you specify MyApp for applicationName, by default the appLocation is downloadedContent/MyApp.ear of the target managed node. If you specify a value for appLocation, use the destination value that you specified when distributing the application. |
String |
serverName | Optionally specifies the name of the server where the system updates the application. | String |
nodeName | Optionally specifies the node of interest, which identifies the server in a WebSphere Application Server, Network Deployment cell. | String |
clusterName | Optionally specifies the name of the cluster in which the application is updated. | String |
Example usage
AdminTask.submitJob('-jobType updateApplication -targetList [Node1 Node2 Node3] -jobParams [[applicationName MyApp]]')
or:
AdminTask.submitJob('-jobType updateApplication -targetList [Node1 Node2 Node3] -jobParams [[applicationName MyApp][appLocation MyApp.ear][clusterName TestCluster]]')
The uninstallApplication administrative job uninstalls the application from the target nodes.
Job parameters
Parameter | Description | Type |
---|---|---|
applicationName | Specifies the name of the application to remove. | String |
Example usage
AdminTask.submitJob('-jobType uninstallApplication -targetList [Node1 Node2 Node3] -jobParams [applicationName MyApp]')
The system administrator can use the application server configuration jobs to modify the configuration for remote and local application servers.
The createApplicationServer administrative job creates an application server in the target environment.
Job parameters
Parameter | Description | Type |
---|---|---|
serverName | Specifies the name of the application server to create. The server name must be unique on the target node. | String |
nodeName | When the target is a WebSphere Application Server, Network Deployment cell, you must specify the node name to indicate on which node in the cell the server is to be created. You do not have to specify the node name for a base node. | String |
templateName | Optionally specifies the server template. | String |
templateLocation | Optionally specifies the location where the template is stored. Use the default, system defined location unless you need to specify a template location. | String |
genUniquePorts | Optionally specifies to generate unique http ports for a server. By default, the product generates unique port numbers. | Boolean |
Example usage
AdminTask.submitJob('-jobType createApplicationServer -targetList [Node1 Node2 Node3] -jobParams [serverName AppServer01]')
The deleteApplicationServer administrative job removes an application server from the target environment.
Job parameters
Parameter | Description | Type |
---|---|---|
serverName | Specifies the name of the application server to delete. | String |
nodeName | When the target is a WebSphere Application Server, Network Deployment cell, you must specify the node name to indicate from which node in the cell the server is to be deleted. You do not have to specify the node name for a base node. | String |
Example usage
AdminTask.submitJob('-jobType deleteApplicationServer -targetList [Node1 Node2 Node3] -jobParams [serverName AppServer01]')
The createProxyServer administrative job creates a proxy server in a cell of a deployment manager that is a managed node of a job manager.
Job parameters
Parameter | Description | Type |
---|---|---|
serverName | Specifies the name of the proxy server to create. | String |
nodeName | Specifies the node in which the proxy server will reside. | String |
Example usage
AdminTask.submitJob('[-jobType createProxyServer -jobParams [[serverName testServer1][nodeName testNode1]] ]')
The deleteProxyServer deletes a proxy server from a cell of a deployment manager that is a managed node of a job manager.
Job parameters
Parameter | Description | Type |
---|---|---|
serverName | Specifies the name of the proxy server to delete. | String |
nodeName | Specifies the node in which the proxy server resides. | String |
Example usage
AdminTask.submitJob('[-jobType deleteProxyServer -jobParams [[serverName testServer1][nodeName testNode1]] ]')
The createCluster administrative job creates a cluster. To create the cluster in a cell, you must register the deployment manager of the cell with a job manager.
Job parameters
Parameter | Description | Type |
---|---|---|
clusterConfig.clusterName | Specifies the name of the server cluster. | String |
clusterConfig.preferLocal | Optionally enables node-scoped routing optimization for the cluster. | String |
clusterConfig.clusterType | Optionally specifies the type of server cluster. | String |
replicationDomain.createDomain | Optionally creates a replication domain with a name set to the name of the new cluster. | String |
convertServer.serverNode | Optionally specifies the name of the node of the existing server to convert to the first member of the cluster. | String |
convertServer.serverName | Optionally specifies the name of the existing server to convert to the first member of the cluster. | String |
convertServer.memberWeight | Optionally specifies the weight value of the new cluster member. | String |
convertServer.nodeGroup | Optionally specifies the name of the node group to which all cluster member nodes must belong. | String |
convertServer.replicatorEntry | Optionally specifies that a replicator entry for this member is created in the cluster replication domain. The replicator entry is used for HTTP session data replication. | String |
Example usage
AdminTask.submitJob('[-jobType createCluster -targetList [DmgrManagedNodeName] -jobParams [clusterConfig.clusterName newCluster1]]')
If you specify additional parameters on the createCluster command, use the format of [stepName.parameterName parameterValue] in the -jobParams list of parameters.
AdminTask.submitJob('[-jobType createCluster -targetList [DmgrManagedNodeName] -jobParams [ [clusterConfig.clusterName newCluster1] [clusterConfig.clusterType PROXY_SERVER] ]]')
The deleteCluster administrative job deletes a cluster. To delete the cluster in a cell, you must register the deployment manager of the cell with a job manager.
Job parameters
Parameter | Description | Type |
---|---|---|
clusterName | Specifies the name of the server cluster to delete. | String |
replicationDomain.deleteRepDomain | Optionally used to indicate that the cluster replication domain is to be deleted when the cluster is deleted. | String |
Example usage
AdminTask.submitJob('[-jobType deleteCluster -targetList [DmgrManagedNodeName] -jobParams [ [clusterName newCluster1] [replicationDomain.deleteRepDomain true] ]]')
The createClusterMember administrative job creates a cluster member on a cluster, which is in a cell. You must register the deployment manager of the cell with a job manager.
Job parameters
Parameter | Description | Type |
---|---|---|
clusterName | Specifies the name of the server cluster to which the new cluster member belongs. | String |
memberConfig.memberNode | Specifies the name of node where the new cluster member is to reside. | String |
memberConfig.memberName | Specifies the name of the new cluster member. | String |
memberConfig.memberWeight | Optionally specifies the weight of the new cluster member. | String |
memberConfig.memberUUID | Optionally specifies the universal unique identifier (UUID) of the new cluster member. | String |
memberConfig.genUniquePorts | Optionally specifies to generate unique port numbers for HTTP transports defined in the server. | String |
memberConfig.replicatorEntry | Optionally specifies that a replicator entry for this member is created in the cluster replication domain. The replicator entry is used for HTTP session data replication. | String |
firstMember.templateName | Optionally specifies the name of the application server template to use as the model for new cluster members. | String |
firstMember.templateServerNode | Optionally specifies the name of the node of an existing server to use as a template for new cluster members. | String |
firstMember.templateServerName | Optionally specifies the name of the server to use as model for new cluster members. | String |
firstMember.nodeGroup | Optionally specifies the name of the node group to which all cluster member nodes must belong. | String |
firstMember.coreGroup | Optionally specifies the name of the core group to which all cluster members must belong. | String |
Example usage
AdminTask.submitJob('[-jobType createClusterMember -targetList [DmgrManagedNodeName] -jobParams [ [memberConfig.memberName newCluster1mem1] [memberConfig.memberNode FederatedNode] [clusterName newCluster1] ]]')
The deleteClusterMember administrative job deletes a cluster member from a cluster, which is in a cell. You must register the deployment manager of the cell with a job manager. The cluster must have at least one cluster member on a federated node.
Job parameters
Parameter | Description | Type |
---|---|---|
clusterName | Specifies the name of a server cluster to which the cluster member to be deleted belongs. | String |
memberNode | Specifies the name of the node where the cluster member resides. | String |
memberName | Specifies the server name of the cluster member to be deleted. | String |
replicatorEntry.deleteEntry | Optionally specifies to delete the replicator entry having the server name of this cluster member from the replication domain of the cluster. | String |
Example usage
AdminTask.submitJob('[-jobType deleteClusterMember -targetList [DmgrManagedNodeName] -jobParams [ [memberName newCluster1mem1] [memberNode FederatedNode] [clusterName newCluster1] ]]')
The configureProperties administrative job applies a properties file to the application server configuration. This job uses the applyConfigProperties command in the PropertiesBasedConfiguration command group for the AdminTask object to configure the properties for the target node.
Job parameters
Parameter | Description | Type |
---|---|---|
propertiesFileLocation | Specifies the location of the properties file
to apply to the targeted application server. The path specified for this parameter is the relative path from the profile_root/downloadedContent directory for the deployment manager. You must create this directory, if it does not already exist, before you start the configureProperties administrative job. |
String |
variableMapLocation | Optionally specifies the location of a variable map file to include with the properties file. | String |
Example usage
AdminTask.submitJob('-jobType configureProperties -targetList [Node1 Node2 Node3] -jobParams [propertiesFileLocation myProperties.props]')
The system administrator can use the application server runtime control jobs to start and stop application servers.
The startServer administrative job launches and initializes the application server of interest.
Job parameters
Parameter | Description | Type |
---|---|---|
serverName | Specifies the application server to start. | String |
nodeName | If the target of the job is a deployment manager node, specify the name of the federated node where the server exists. | String |
Example usage
AdminTask.submitJob('-jobType startServer -targetList [Node1 Node2 Node3] -jobParams [serverName AppServer01]')
The stopServer administrative job stops the application server of interest. Use the startServer job to restart the application server.
Job parameters
Parameter | Description | Type |
---|---|---|
serverName | Specifies the application server to stop. | String |
nodeName | If the target of the job is a deployment manager node, specify the name of the federated node where the server exists. | String |
Example usage
AdminTask.submitJob('-jobType stopServer -targetList [Node1 Node2 Node3] -jobParams [serverName AppServer01]')
The startCluster administrative job starts a cluster. To start a cluster in a cell, you must register the deployment manager of the cell with a job manager.
Job parameters
Parameter | Description | Type |
---|---|---|
clusterName | Specifies the name of the cluster to start. | String |
rippleStart | Optionally specifies whether the cluster is started in a ripple start. The default value is false. | String |
Example usage
The following example starts a cluster:
AdminTask.submitJob('[-jobType startCluster -targetList [DmgrManagedNodeName] -jobParams [clusterName newCluster1]]')
The following example ripple starts a cluster.
AdminTask.submitJob('[-jobType createCluster -targetList [DmgrManagedNodeName] -jobParams [ [clusterName newCluster1] [rippleStart true] ]]')
The stopCluster administrative job stops a cluster. To stop a cluster in a cell, you must register the deployment manager of the cell with a job manager.
Job parameters
Parameter | Description | Type |
---|---|---|
clusterName | Specifies the name of the cluster to stop. | String |
Example usage
AdminTask.submitJob('[-jobType stopCluster -targetList [DmgrManagedNodeName] -jobParams [clusterName newCluster1]]')