Viewing Java batch jobs in Admin Center
With the Admin Center Java Batch tool, you can view the progress and status of your Java™ batch jobs.
Before you begin
To use the Java Batch tool, you must enable the tool in Admin Center and have batch jobs to view:
- Ensure that the configuration file for the server that runs Admin Center has the following Liberty features:
adminCenter-1.0
batchManagement-1.0
- Add the Java Batch tool to your dashboard. See Customizing the Toolbox.
- Create and deploy a Java batch application and then submit batch jobs. The database of batch jobs must be persisted. A database must be used in the persistence configuration even if all jobs run on the same server as the job that runs on the Java batch tool. The Java batch tool can be used to view and manage jobs and job logs of servers that use the same job repository. The scope of the tool's administration function equals the scope of the job repository.
- If the batch jobs or job logs do not reside on the server that runs Admin Center, configure CORS on each remote server that has
batch jobs or job logs to enable Admin Center to request
job information from each remote server. In a multiple-server batch environment, Admin Center relies on CORS to relax the same-origin policy
for remote calls to other Liberty servers. Your CORS configuration on remote servers that Admin Center accesses must specify the URL of the Admin Center server in the
allowedOrigins attribute of the
cors
element:<cors domain="/ibm/api/batch" allowedOrigins="https://Admin_Center_host:Admin_Center_port" allowedHeaders="Accept, Accept-Encoding, Content-Type, X-Requested-With" allowedMethods="GET, PUT, DELETE, OPTIONS" exposeHeaders="" allowCredentials="true" maxAge="3600"/>
The CORS configuration does not need to be on the Liberty server where Admin Center runs. See Configuring Cross Origin Resource Sharing on a Liberty server. For details on
cors
attributes, see cors - Cross-Origin Resource Sharing (cors).
About this task
View and filter your Java batch jobs by using the Java Batch tool.
Procedure
-
Customize the dashboard.
- Select the number of job instances to display.By default, the dashboard displays 100 updated job instances, with the most recent displayed first. From the dashboard footer, select the maximum number of job instances to display. Choices include 50, 100, 500, and 1000.Tip: If the selection is 1000 and the job instance you want to examine is not shown in the dashboard, change the filter options.
- Select the columns of job information to display.
Job information includes the batch job name and ID, the application name, the job submitter, the date of the last update, and the job instance state. You can choose the columns to display.
- Select Column Selection .
- From the list, select the columns that you want displayed. Clear the columns that you don't want displayed.
- Select the number of job instances to display.
-
View job executions.
-
Hover over a Batch Job Name and expand the twistie .
In the executions tables, the values in the Host and Server Name columns are links to corresponding pages in the Explore tool. If you install the Explore tool, you can get more status information on these elements.
-
Select the job execution ID number to view details about the job.
The job execution details page shows details about job steps and partitions.
- Partitions are indicated by Partitions .
- In the Server section of the job execution details page, the values for the Name and Host fields are links to their corresponding pages in the Explore tool. If you install the Explore tool, you can get more status information on these elements.
-
To view details about another job execution, you can change the number on the URL.
For example, if you change 2 in the URL to 4, you can view Job Execution ID 4 without using the interface. See the change in the following URLs:
https://host_name:port_number/adminCenter/#javaBatch/jobexecutions/2
https://host_name:port_number/adminCenter/#javaBatch/jobexecutions/4
- Select Column Selection to display more or less information about the job execution.
-
Hover over a Batch Job Name and expand the twistie .
-
View a log file for a batch job.
- Select View log file .
- From the Log view footer, you can select Top of Logs and End of Logs arrows to view lengthy log files.
- Select Download to download the log file.
-
Manage a job instance.
- Select Actions .
-
Select an action.
- Restart
- Starts a job execution again. By default, the Restart action uses the
parameters of the previous job execution.
You can change the parameters in the Restart dialog:
- Deselect Reuse parameters from previous execution.
- Use Add parameter to add parameters, use Remove parameter to remove parameters, or edit existing parameter names and values.
- Click Restart.
- Stop
- Stops a running job execution.
- Purge
- Deletes all database entries and, optionally, deletes job logs associated with the job instance.
- Confirm the selection.
-
Filter information about job instances.
By default, the tool lists job instances of all states. You can set up numerous search criteria options. If you search by using the same criteria, such as two instance states, the criteria are filtered as
or
operators. If you filter by using different criteria, such as one instance state and one instance ID, the criteria are filtered asand
operators. To change the information that is displayed, change the search criteria:- Select Add Search Criteria .
- From the list of search filter criteria, select one of the following options and specify a value:
- Instance State to display job instances that have one of following
states:
- All to display job instances with the most recently updated appearing last
- Queued to view all instances of Submitted, JMS Queued, and JMS Consumed states. Or select Submitted, JMS Queued, and JMS Consumed individually.
- Dispatched
- Ended filters for all instances with Failed, Stopped, Completed, and Abandoned states. Or select Failed, Stopped, Completed, and Abandoned individually.
- Instance ID to display a job instance with the specified job execution ID.
- Last Update to display job instances with the specified date.
- Last Update Range to display active job instances between the specified dates.
- JES Job Name to display job
instances with the specified job name. You can use the wildcard (
*
) operator anywhere in the string. - JES Job ID to display job
instances with the specified job ID. You can use the wildcard (
*
) operator anywhere in the string. - Submitter to display job instances
with the specified submitter name. The search is case insensitive. You can use the wildcard
(
*
) operator anywhere in the string. - Application Name to display job
instances with the specified application name. The search is case insensitive. You can use the
wildcard (
*
) operator anywhere in the string. - Batch Job Name to display job
instances with the specified batch job name. The search is case insensitive. You can use the
wildcard (
*
) operator anywhere in the string.
- Instance State to display job instances that have one of following
states:
- Select Search to run your query.
To clear your query, select Clear Search Field .
What to do next
To refresh the current page, select Refresh .
To return to the dashboard, select Dashboard .
From the job execution details or job log file page, you can select from the horizontal navigation bar to display a different page.