Show TOC Start of Content Area

Object documentationScheduler Job Definition, Job, and Task  Locate the document in its SAP Library structure

Definition

The Java scheduler implements an object-oriented approach to developing and scheduling jobs. This section outlines the basic concepts of scheduler job definition, task, and job related to the Java Scheduler.

Scheduler Job Definition

A blueprint representation of a job, also called job metadata, which is deployed on the server. A job definition is not bound to any start conditions, and thus is not a job that is scheduled and ready to run.

Concrete job definition instances, or jobs, are created from a scheduler job definition. An infinite number of job instances can be created from a single job definition.

Scheduler Task

Contains the start conditions and parameter values for a job. A scheduler task instructs the Java Scheduler which job definition to instantiate and run, when, and with what parameters. A scheduler task can trigger a single or multiple instances of a job.

You can create various scheduler tasks based on the same job definition. This allows you to have jobs that are based on the same job definition but run with different parameters and different start conditions.

Example

You have a job definition that backs up data. Out of this single job definition, you can create two scheduler tasks: one that backs up files MyFile1 and Myfile2 on every Monday at 8 AM, and another that backs up files MyFile3, Myfile4, and MyFile5 every weekend at 6 PM.

Scheduler Job

An instance of a scheduler job definition that is bound to certain start conditions specified in the scheduler task. A job runs once with particular parameter values at a particular point in time or upon a particular event and performs a certain amount of work. One job runs in one thread.

An infinite number of job instances can be created from a single job definition.

Note

The Java Scheduler supports child jobs and job chains.

Use

You use jobs to perform a certain amount of work in the system automatically and in unattended mode. You create a scheduler task based on a job definition to schedule the jobs created from this job definition.

Structure

Scheduler Job Definition

You use the job definition to code the activities that you want an instance of this job definition to perform. A job definition comprises the following:

      Business logic

The unit of work that is performed when a job instance, that was created from this job definition, runs. You define the job’s business logic in the JobBean class.

      Metadata

Additional information about the job definition, such as name, job parameters description, the JMS resources to be used, and so on. You specify the metadata in the JobBean deployment descriptors.

For more information about the JobBean class and the job definition deployment descriptors, see Job Definition.

Scheduler Task

A scheduler task comprises the following:

      A reference to the job definition you want to schedule.

      Start conditions for the job, which can be of two general types: recurring, and cron. See Scheduler Job Start Conditions

      Values for the job parameters that provide input for the job. For more information about job parameters, see Job Parameter.

Scheduler Job

You use a job to have a certain unit of work done automatically and in unattended mode in the system. As a runtime object, a job has a life cycle characterized by job statuses.

For more information about creating a job definition and scheduler task,see Developing and Scheduling Jobs. For a step-by-step tutorial on creating and scheduling a job, see Creating and Scheduling Your First Job.

Integration

You create a scheduler task based on a scheduler job definition. In this way, you instruct the NetWeaver Scheduler for Java to create and execute instances of the job definition (jobs) at the times specified in the scheduler task.

 

 

End of Content Area