Job Start Management

Definition

Any job can be scheduled to start based either on a certain start time or on any of several events in the background processing system.

Use

Both types of start condition (see below) has its own SAP job scheduler: one is time-driven and one is event-driven. Both schedulers run in dialog work processes. If they find an eligible job, they trigger the job to run in a background work process.

Time-Driven Job Scheduler

This scheduler runs periodically to check for jobs that were scheduled to run based on a certain start time (a particular date, for example). By default, the scheduler runs every 60 seconds on each SAP server that has at least one work process available for background processing. This 60-second interval can be changed in the system profile parameter rdisp/btctime .

The time-driven scheduler will also take over the responsibility of starting event-based jobs if such jobs cannot yet be started when the defined start condition occurs (if, for example, no free background work processes are available when the start condition is met). These jobs are managed as jobs whose start time has already arrived and start running as soon as possible.

Event-Driven Job Scheduler

This scheduler starts whenever a background processing event is triggered. Background processing events have nothing to do with workflow events and have no system-wide meaning. An example of a background processing event is "Job completed."

The scheduler checks for any jobs that have been scheduled to wait for a certain event or for the event argument and starts these jobs once the event occurs. Event-driven jobs are those that have been scheduled with the one of three start conditions: After event, At operation mode or After job.

Events can either be triggered within the SAP System or generated externally at the operating-system level. Events are automatically passed by the message server to an active background processing server. In order to respond to external events, the SAP System must be active. An event triggered by an external program will be lost if the SAP System is not running.

Start Eligibility

A job is eligible to start when both of the following are true:

  • The
  • start condition specified for the job is met.
  • The job has been
  • released to run.

    No job can be run until it has been released, even those scheduled to start immediately. To
    monitor and control what jobs are submitted to run in background processing, the system can be configured so an administrator can check jobs before releasing them to run.

    The release requirement can also be turned off on a per-user basis. Trusted users can be given a special authorization (authorization object S_BTCH_JOB (Batch Processing: Operations on Batch Jobs), value RELE) which will automatically and immediately release any job scheduled by that user.

Job Start Conditions Explained

Job Start Conditions

Explanation

Immediate

This job will start as soon as possible, subject to job priority and the availability of background work processes.

Users granted the appropriate authorizations for background processing can have their jobs released automatically as soon as they are scheduled, without special attention from a system administrator.

Date/time

The job will start at the date and time specified, subject to job priority and the availability of background work processes.

You can further define a timeframe in which the job will run by specifying a time later than which a job will not run. One use of this feature is to prevent periodic jobs from running when they should not. For example, a routine clean-up job scheduled to run only at night is delayed. By defining a start-time window, you will keep this job from being started during the day, when dialog users are active and fewer system resources are available.

After Job

The job will start on the completion of the specified job. You can specify whether the preceding job must complete successfully or not.

Note: Jobs scheduled to start when a preceding job completes cannot be specified as "Periodic jobs".

After Event

The job is triggered by the specified event, descriptions of which follow.

This start condition lets you define a sequence of individual jobs to model complex activities in your system.

For example, a data transfer program that generates a batch-input session can, once the session has been completely generated, use an event to trigger another job that processes the session.

At operation mode

The job will start when the specified operation mode becomes active in the SAP System.

Workday/Time (>>)

The job will start on the specified day of the month (for example, the third to last day of the month)

By specifying the appropriate SAP factory calendar, your scheduling can accommodate the occurrence of holidays or other non-workdays.

You can further specify how the job should be handled if the start day lands on a non-working day. For example, you can have the job started on the workday before or after the actual scheduled date, or allow the job run in anyway, or have the job be skipped on that day entirely.


Verify that the calendar you choose has been correctly defined. If, for example, the calendar ends with the current year and your job is to be started next year, the job will terminate abnormally. If a calendar problem occurs, you can review system’s error messages in the job log of the terminated job.

End of Content Area

No comments:

topics