Submitting jobs
In a flexible management environment, we can submit jobs to remote targets to manage applications, modify the product configuration on remote machines, or do a general purpose task such as run a script. We can specify when the jobs start, whether they are recurring, and when they expire.
Before we can submit a job, you must have registered at least one target with the job manager. A target can be an application server node that was first registered with an administrative agent, a deployment manager node, or a host computer.
Start the job manager and the targets. If a target is a stand-alone application server, also start the administrative agent.
Your ID for the job manager must be authorized for the administrator role or the operator role to submit jobs. When you submit a job, we can specify a user name and password for authentication and authorization at the target or targets. If we do not provide a user name and password in the job parameters, the credentials for the job submitter at the job manager are used for this purpose. When you submit a job to multiple targets, the user name and password or the credentials for the submitter must apply to all the job targets.
We can simplify administration of multiple targets by submitting jobs against groups of targets. Each group of targets represents a group of targets. Before we can submit a job for a group of targets, you must have created the group of targets.
Job manager functionality exists in a job manager and in a deployment manager. For simplicity, this documentation refers to the functionality as the job manager.
Use the console of the job manager or deployment manager to submit jobs to do tasks such as manage applications, modify the product configuration on remote workstations, or do general-purpose tasks such as run a script. To complete the job submission, choose the type of job, choose the targets on which we want the job to run, specify the job parameters that are specific to the job type, schedule the job, review the summary, and submit the job.
The topics in this section describe how to submit jobs using a job manager console or a deployment manager console. Instead of using a console, we can submit jobs from the command line using the wsadmin submitJob command in AdministrativeJobs command group. See the topic on administrative job types.
- Click Jobs > Submit from the navigation tree of the job manager console or deployment manager console.
- Choose the job type.
- Select the job type from the list.
The list of job types varies based on the targets that we have registered with the job manager. The values displayed in the list are retrieved from the getJobTypes and getJobTypeMetadata commands of the AdminTask object. We can have job types that manage applications, modify the product configuration on remote machines, or do general-purpose tasks such as run a script.
The following job types exist:
- Collect file
- Configure properties
- Create application server
- Create cluster
- Create cluster member
- Create proxy server
- Delete application server
- Delete cluster
- Delete cluster member
- Delete proxy server
- Distribute file
- Add or search for Installation Manager agent data locations
- Install application
- Install IBM Installation Manager
- Install Liberty profile resources
- (dist)(zos) Install SSH public key
- Inventory
- Manage offerings
- Manage profiles
- Generate merged plugin configuration for Liberty profile servers
- Remove file
- Run command on remote host
- Run wsadmin script
- Start application
- Start cluster
- Start server
- Start Liberty profile server
- Status
- Stop application
- Stop cluster
- Stop Liberty profile server
- Stop server
- Test connection
- Uninstall application
- Uninstall IBM Installation Manager
- Uninstall Liberty profile resources
- Update application
- Update IBM Installation Manager
- Optionally specify a description of the job.
The description is a string that can be up to 256 characters. The default description is the job type. We can change or add to the default description. The description is useful when using the Find option to view existing jobs.
- Click Next.
- Choose the job targets.
We are determining the targets on which we want the job to run.
- Select a group of targets from the list, or select Target name.
Only groups of targets that are valid for the job type selecteded are displayed in the list of groups of targets.
- If we selected Target name, then enter a target name, and click Add, or generate a list of targets using the Find option.
- Target name that you enter
- If we enter a target name, it must be a target that has been registered to the job manager. The target name is validated when you click Next.
- List of target names
- Click Find.
The Find targets page is displayed.
- For Target type, select All, Host, or Node. The default value is All.
- To run the Find operation on specific keywords, specify a valid operator and a text string.
The list of keywords is dynamic. Valid operators are = (equal to), != (not equal to), is null, and is not null. The text string can be complete or partial and can contain an asterisk (*) to include variable or unknown characters.
- Click Find.
The results are displayed in the Excluded targets list and are selected.
- Move targets to target from the Excluded targets list to the Chosen targets list.
- To move specific targets from the Excluded targets list to the Chosen targets list, select targets in the Excluded targets list and click >.
- To move specific targets from the Chosen targets list to the Excluded targets list, select targets in the Chosen targets list and click <.
- After we have a list of the wanted targets in the Chosen targets list, click OK.
The targets display on the Choose job targets page.
- If the target requires authentication, specify a user name and password so that the target can run the job.
For example, to access a target host, you typically specify values for User name and Password authentication. The user name and password are the login values for the host. If the target host does not require a password, leave the fields blank.
If we want a substitute user to perform commands on the target host, select Use sudo to change users before a job runs, and then specify the user name and password for the substitute user as needed. sudo means "substitute user do". If the target host does not require a password, leave the password fields blank. The following selection combinations are valid:
- Select Use sudo, and leave the user name and sudo password blank. These selections use the default user set in the /etc/sudoers file and use the password of the connection user.
- Select Use sudo, specify a user name, and leave the sudo password blank. These selections use the specified user and use the password of the connection user.
- Select Use sudo, specify a user name, and specify a sudo password. These selections use the specified user and sudo password.
The default is not to use sudo. The sudo option is supported on AIX, HP-UX, Linux, and Solaris operating systems only.
To use public-private key authentication, select Public-private key authentication and then specify the full path to the keystore and, if required for the keystore, the passphrase.
Best practice: To use public-private key authentication, first generate a pair of keys using a key generation tool such as ssh-keygen. Next, add the public key to the authorized_keys file of the user on the target host. Then, on this Choose job targets page, specify the user name, fully qualified private key file, and optionally the fully qualified passphase.best-practices
- Click Next.
- Specify the job parameters.
The list of job parameters is dynamic and based on the job type. For example, if the job type is to install an application, specify the application name, the location of the application to install, and optionally the name of the server where the system installs the application.
When you submit a job to multiple targets, the parameter values must apply to all the job targets.
The following table describes the types of parameters.
Parameter Type Description String We can enter text for the appropriate parameters. The text is not validated until the job is submitted. Target resource We can select a target resource. The Find option is available for you to search for the resource, depending on the job type selecteded in the first step.
- Optionally click Find if it is available.
The Find target resources page is displayed.
- To run the Find operation on specific keywords, specify a valid operator and a text string.
The list of keywords is dynamic. Valid operators are = (equal to), != (not equal to), is null, and is not null. The text string can be complete or partial and can contain an asterisk (*) to include variable or unknown characters.
- Click Find.
The results are displayed in the Available resources common to all selected endpoints list.
- Click OK to save the results and return to the page on specifying job parameters.
- Click Next.
- Schedule the job.
The times and dates specified are relative to the job manager.
- Optionally specify one or more email addresses where notifications are sent when the job is done.
If we specify multiple email addresses, separate them with commas. The email addresses are saved in the console preferences. Each email address is validated for format errors.
- Select when the job is available for submission.
We can submit the job to be available now, or specify a time and date that the job is retrieved from the job manager.
- Select the job expiration.
The job expiration is the time at which the job is no longer available for targets to run. Use the default expiration, specify a time and date for the job expiration, or specify an amount of time in which the job expires. The default expiration is defined on the Job manager configuration page.
- Optionally specify a recurring interval for the job, a start date and time for the interval, and an end date and time for the interval.
- Click Next.
- Review the summary, and submit the job.
- To change the options, click Previous until you reach the page to change. Make the correction on that page, and then proceed through the pages until you review the Summary and submit the job page.
- When you are satisfied with the options, click Finish to submit the job.
The Job status collection page is displayed where only the status for the job that you submitted is displayed.
Results
After you submit a job, the job might not be run immediately. The job manager queues submitted jobs. The administrative agents and deployment managers poll the job manager for jobs when they are online, based on their configured polling intervals. The default polling interval is 30 seconds. It takes at least two polling cycles for administrative agents and deployment managers to retrieve jobs and then return results to the job manager. Depending on how long it takes for the target to process the job, it might take more cycles to complete the job.
What to do next
After you submit a job, the Job status page shows a unique job ID; for example, 122763380912576341. Use the job ID to query, suspend, resume, or delete the job. When you click a job ID, you see the specific properties of that job, including activation and expiration time of the job and its status. If we click the job status link, you see the job history for each job target. Click the status refresh icon
to refresh the displayed status.
We can check the state and status of a job using the job manager console or a wsadmin command.
The job state shows where the job is in the execution process from the job manager perspective. Table 1 lists the job states.
Job states Description Pending You submitted the job, but the job is not available yet to be run on the targets. Active One or more targets have started running the job. Expired The job has expired. If a target started to run the job before it expired, the job continues running. After a job expires, a target cannot start running the job. Suspended The job suspended operation. If a target started to run the job before it is suspended, the job continues running. After a job is suspended, a target cannot start running the job. The job status shows a history of the job processing on a managed target. A typical job history is for the status to progress from Distributed to In progress to Succeeded. Table 2 shows the job status values.
status descriptions. The status indicates whether the
Job status Description Not attempted The target has not received the job. The status is NOT_ATTEMPTED. Distributed The target has received the job. The status is DISTRIBUTED. In progress The target is running the job concurrently with other jobs. The status is ASYNC_IN_PROGRESS. Failed The job failed and is no longer running. The status is FAILED. Rejected The target rejected the job because, for example, the target does not support the job type. The status is REJECTED. Succeeded Job completed successfully. The status is SUCCEEDED. Partially succeeded Applies only to startCluster and stopCluster jobs where the cluster has multiple cluster members and to startApplication and stopApplication jobs where the application is installed on multiple targets. If only some cluster members are started or stopped or the application does not start on all application targets, the status of the job is PARTIALLY_SUCCEEDED. By default, submitted jobs remain active for one day (24 hours). An active job is a running Java process that consumes machine resources. Delete jobs that you no longer need. Use the job manager console Job status page. Click Jobs > Status, select the jobs, and click Delete.
Subtopics
- Submitting jobs to manage servers
In a flexible management environment, we can submit jobs to create and administer servers on managed targets of the job manager. The servers can be a stand-alone server or a federated node of a deployment manager.
- Submitting jobs to deploy Liberty profile installations
Use the job manager to submit jobs to deploy Liberty profile installations on target hosts.
- Submitting jobs to manage files
In a flexible management environment, we can submit jobs to collect files from managed targets and copy them to the job manager, to distribute files to managed targets, and to remove files from managed targets.
- Submitting jobs that test connections to a remote host
We can submit the Test connection job to verify access to remote hosts. After a remote host computer is registered with a job manager, we can use the Test connection job to check the connection between the job manager and the remote host.
- Submitting jobs to run commands on a remote host
We can submit the Run command on remote host job to run command-line utilities such as startServer, wsadmin commands, or operating system commands on a remote host. A WebSphere Application Server installation on the remote host is required to run product commands, but is not required for non-product commands.
- Submitting jobs to manage profiles on a remote host
We can submit the Manage profiles job to create, delete, augment, back up, list, and restore profiles on remote hosts. Profiles are sets of files that define the runtime environment. On local host computers, we can use the manageprofiles command or the Profile Management Tool to manage profiles. After a remote host computer is registered with a job manager, we can use the Manage profiles job to run the manageprofiles command on the remote host. The remote host must have a WAS installation.
- Submitting Installation Manager jobs
In a flexible management environment, we can submit jobs to install Installation Manager instances, update Installation Manager with a repository (not supported on z/OS targets), manage Installation Manager offerings, and install WebSphere Application Server v8.5 products.
- Submitting jobs to manage applications
In a flexible management environment, we can submit jobs to install and administer enterprise applications on managed targets of the job manager and to uninstall files from targets. An enterprise application is an EAR file that conforms to Java EE specifications.
- Submitting jobs to collect status on managed servers and applications
In a flexible management environment, we can submit the Status job to refresh data on managed resources of the job manager. Resources include applications and servers of each target. Run the Status job to refresh data on target resources in the job manager database. We can view the refreshed data in the job manager console or by wsadmin scripts.
- Submitting jobs to collect inventory data
In a flexible management environment, we can submit the Inventory job to refresh data on job types and on managed resources of the job manager. When a target is a host, the collected data includes information on the host such as operating system name, version, Installation Manager, package group, packages, profiles, and other resources. If we installed a product that adds job types on a managed target, run the Inventory job to refresh data on job types and target resources. We can view the refreshed data in the job manager console or by wsadmin scripts.
- Submitting jobs to run wsadmin scripts
In a flexible management environment, we can submit the Run wsadmin script job to run commands in a wsadmin script file on managed targets of the job manager. We must distribute the wsadmin script file before we can submit jobs that run the script file.
- Find target resources
Use this page to find target resources for resource job parameters when you submit a job through the job submission wizard. This page is used for job types such as start server, stop server, and start cluster.
Related concepts
Job manager
Related tasks
Set up a job manager environment Administer nodes remotely using the job manager Administer groups of nodes for the job manager Checking job status
Administrative job types Find targets