Executing Jobs in Java Stack (JXBP)
AE provides the following opportunities for the handling of jobs in the SAP Java Scheduler :
- Start jobs using parameters
- Cancel jobs
- Include the logs in the job reports
- Monitor jobs via filter using the RemoteTaskManager
First, the Java job definition must be deployed in the Java Schedule to make it visible to the SAP agent. Subsequently, you can use a Job object to create an instance from an existing job definition.
A SAP Job object always belongs to exactly one SAP Java job definition.
Create a SAP Job object for Java Scheduler jobs and select a SAP agent plus a Login object. Use the Form tab to select the job definitions to be applied. The lower part of the tab automatically displays the corresponding parameters.
The Job log tab contains the following options:
- Delete after x days - The job log is deleted from the Java Scheduler after x days.
- Do not remove - The job log is not removed from the Java Scheduler.
- Use default settings - The period after which the job log is deleted from the Java Scheduler depends on the settings made in the job definition.
The job log is always deleted together with the job instance.
Report for Java Statistics
A processed SAP Job object can also contain a report (SJJI) which includes information about the Java job. Activate this function by checking the relevant checkbox in the area Optional reports in the Job object's SAP tab.
Installation
Creating the external Schedulers in SAP:
- Use the WebInterface to log on to the SAP NetWeaver Administrator.
- Select the Job tab.
- Click the link "Java Scheduler" -> "External Scheduler".
- Insert a new entry in the list of registered external Java Schedulers ("Add").
- Complete the fields. Specify "Automation Engine" for the name and the description.
- Click on Add.
Creating a Connection object in AE:
- Log on to system client 0000.
- Create a new Connection object for SAP.
- Open the Connection object and select the connection type "Internet" in the Attributes tab.
- Switch to the Internet tab and specify the connection data for the SAP Java Scheduler. Indicate the user that was used to add AE as an external Scheduler.
- Store and close the Connection object.
- Switch to the folder HOST and open the SAP Agent's object.
- Select the Connection object in the Agent page in the field Java Basis.
- Store and close the Agent object.
- Restart the SAP agent if it is currently running.
Special Cases
In an environment of several nodes, the Java Scheduler jobs are processed on the node on which the Scheduler Service is active. If this node is deactivated or fails, job processing continues on a different node.
The agent periodically attempts to re-establish the connection to the Java Scheduler if it has been lost during job execution. The job remains active in the AE system and obtains the status "Waiting for remote system".
The job aborts if calling the Java Scheduler results in an error. In this case, there is no report about the Java job's statistics. The error is logged in the Job object's report "Agent Log" and in the SAP agent's log file. The job aborts with return code 403.
Restarts are not possible. The complete job starts in the Java Scheduler because there is no AE JCL.
Return Codes
SAP status | Job return code in AE |
---|---|
COMPLETED HOLD RUNNING SCHEDULED STARTING UNKNOWN |
0 |
ERROR | 501 |
CANCELED | 502 |