Creating and Scheduling Your First Job
Use
This section guides you by example through the steps you need to complete to develop and deploy a job definition, as well as to create a scheduler task for this job definition by using the Scheduler API.
Prerequisites
You are familiar with the following sections:
Process
To develop and schedule a job, you need to complete the steps outlined below:
Developing and Deploying the Job Definition
-
Develop the source code of the JobBean class.
-
In the ejb-j2ee-engine .xml deployment descriptor, set the correct JMS destination name and connection factory name.
-
Create a job-definition.xml descriptor for the JobBean.
-
In the j2ee- engine .xml deployment descriptor, set a runtime reference to the APIs of the SAP NetWeaver Scheduler for Java, as well as mark up the job application to identify it as a job.
-
Build the project.
-
Deploy the EAR file on the server.
Scheduling a Job Definition
From within an application deployed on AS Java:
-
Get a JNDI reference to the scheduler.
-
Create and schedule a scheduler task for job definition.
For the step-by-step tutorial on developing and scheduling a job, see Hello Job .