Managing Oracle Enterprise Scheduler Requests

An application uses Oracle Enterprise Scheduler to execute jobs on the application's behalf. When the application wants to execute a job, it sends a job request to Oracle Enterprise Scheduler. You configure those jobs by using job definitions that specify the job's parameters and associate them with the application. When you want to group together a collection of job requests, you create a job set.

The work of administering job requests includes submitting requests, searching for existing requests and viewing information about them, and pausing and canceling requests. You can do these tasks with Fusion Middleware Control Console.

This section contains the following topics:

Submitting an Oracle Enterprise Scheduler Job Request

You can submit a job request by choosing a job definition that defines the metadata you want and by defining a schedule that guides when the job runs.

This section contains the following topics:

Creating a Job Request

You create a job request by selecting a job definition for the job request, then selecting or creating a schedule.

You may want to configure system properties for the job request, such as the number of retries to attempt in the event of an execution error and a time out value for the job.

To submit a job request:

  1. Use a pre-existing job definition. You can also first create a new job definition, as described in Creating or Editing a Job Definition.

  2. Navigate to the Submit Job Request page by clicking the Scheduling Service menu selecting Job Requests, then selecting Submit Job Request.

  3. Select the application for which you want to submit the job request.

    From the Application dropdown list, select the application deployment name.

  4. Under Job Request Details, enter a description of the job request in the Submission Notes text field.

  5. Select a job definition.

    1. Under Job Definition, click the search button next to the Job Definition text field.

    2. Search for the required job definition.

      In the Name text field, enter the name of the job definition you want to find. You can also enter the job definition's package in the Package field.

      Click Go to search for the job definition.

    3. From the search results table, select the job definition name.

    4. Click OK.

  6. In the Parameters region, optionally define any parameters you want to use with the scheduled job request.

    1. In the Job Parameters region, click Add to add a parameter.

      Fill in a name and value for the parameter.

    2. You can set a value for any of the system properties available.

      For example, you may want to configure the number of permissible retries for the job (SYS_retries), or a time out value (SYS_request_timeout).

  7. Select a schedule by which the job is to run.

  8. Click OK.

Specifying a Job Request Schedule

In the Submit Job Request page, selecting Specify schedule enables configuring your own schedule for a job request. You can configure a recurring job request using a job request schedule. Alternatively, you can configure a job request to run immediately or before a specified end date. Use a pre-existing job definition, or create a new job definition, as described in Creating or Editing a Job Definition.

To specify a schedule:

  1. In the Schedule region, select Specify schedule.
  2. From the Frequency dropdown, select how often you want job requests using this schedule to run. Each frequency option has its own way to specify details for the option. As you specify details, note that you can also use the Time Zone dropdown to specify time zones.
  3. Select the Save Schedule check box to save this schedule for later use by this or other job requests, then enter the following:
    • Name: Enter a name for the schedule. This is the name that appears when you assign the schedule to a job request.

    • Display Name: Enter a value that is played to users for this schedule.

    • Package: Optionally enter the name of a Java package related to this schedule if it helps you find or group schedules.

    • Description: Optionally enter a description.

Searching for Oracle Enterprise Scheduler Job Requests

The Request Search page enables searching for job requests. Using the Request Search page, you can:

  • Conduct a quick search by selecting a pre-configured search option from the Quick Search dropdown menu.

  • Conduct a basic search that returns a list of job request details, including job request ID, executing application, job request status, and so on.

  • Conduct an advanced search based on Run Time/Wait Time, Retry of Failed Runs, Date Range, Error Type and Request ECID/Correlation Flow ID along with the fields available as part of Basic Search.

  • Modify the column display in the search results table.

This section contains the following topics:

Searching for a Job Request Using Simple Search

Basic search allows you to find a job request according to particular criteria such as job request ID, related application, job request status, and so on, or by any one of a number of pre-configured quick searches.

To search for a job request:

  1. Navigate to the Request Search page by clicking the Scheduling Service menu and selecting Job Requests, then selecting Search Job Requests.
  2. Select the scope of the job request search by selecting one of the following options:
    • Current Scheduling Service: Select this option to search for job requests submitted only to the scheduling service with which you are currently working.

    • All Scheduling Services sharing the ESS repository: Select this option to search for job requests submitted to all scheduling services sharing the repository -- for example, all scheduling services in a cluster of scheduling services.

      The repository -- the Oracle Enterprise Scheduler run-time database that holds jobs requests -- can be shared across multiple domains with Oracle Enterprise Scheduler. This might be useful to see jobs running across domains that might be stressing a shared resource, such as a database.

  3. To run a fast search, from the Quick Search dropdown list, select a pre-configured search option as shown in the following list.
    • Requests submitted in the last hour

    • Pending requests submitted in the last 24 hours

    • Errored requests submitted in the last 24 hours

    • All running requests

    • All pending requests

    • Requests currently being retried

    • Requests retried in the last 24 hours

    • Requests that resulted in System Error in the last 24 hours

    • Requests that resulted in Business Error in the last 24 hours

    • Ready requests for selected Work Assignment.

    • Asynchronous requests that require manual recovery.

    To run a regular job request search, skip this step.

  4. Enter or select the criteria by which to search for job requests.
    • Request ID: Enter the ID of the job request for which you want to search.

    • Application: From the Application dropdown list, select the name of the application related to the job request for which you want to search. Alternatively, select All to search for job requests in all applications.

    • Status: Select the status of the job request for which you want to search. Alternatively, select All to search for job requests with all statuses.

      The job request statuses are:

      • Blocked

      • Cancelled

      • Cancelling

      • Completed

      • Error

      • Error Auto Retry

      • Error Manual Recovery

      • Expired

      • Finished

      • Hold

      • Paused

      • Pending Validation

      • Ready

      • Running

      • Schedule Ended

      • Succeeded

      • Unknown

      • Validation Failed

      • Wait

      • Warning

    • Execution Type: Options include Java Type, SQL Type, and Process Type.

    • Submitted: From the dropdown list, select the time period in which the job request to be searched has been submitted. Options include Last Hour, Last 24 Hours, Last 7 Days, and Last 31 Days.

    • Submitted By: In the text field, enter the name of the user who submitted the job request you want to find.

    • Submission Notes: In the text field, enter any notes associated with the submission.

    • Job Definition: Click the search button next to the text field and select the relevant job definition name.

    • Job Location: Specify an abstract location for EJB and web services jobs. See Job Location Properties for more information.

    • Work Assignment: Click the search button next to the text field and select a work assignment from the list.

    • Product: In the text field, enter the name of the product using the job request.

  5. Optionally, conduct an advanced search by clicking the Advanced button. For more on advanced search, see Searching for a Job Request Using the Advanced Search Feature.
  6. Click Search to submit the job request search.

Searching for a Job Request Using the Advanced Search Feature

An advanced search is available in the Request Search page by clicking the Advanced button.

To search for a job request:

  1. Enter a basic search for a job request. Navigate to the Request Search page by clicking the Scheduling Service menu and selecting Job Requests, then selecting Search Job Requests.
  2. Select the scope of the job request search by selecting one of the following options:
    • Current Scheduling Service: Select this option to search for job requests submitted only to the scheduling service with which you are currently working.

    • All Scheduling Services sharing the ESS repository: Select this option to search for job requests submitted to all scheduling services sharing the repository, for example all scheduling services in a cluster of scheduling services.

      The repository -- the Oracle Enterprise Scheduler run-time database that holds jobs requests -- can be shared across multiple domains with Oracle Enterprise Scheduler. This might be useful to see jobs running across domains that might be stressing a shared resource, such as a database

  3. Select your basic search criteria. For more information, see Searching for a Job Request Using Simple Search.
  4. Click Advanced to display the fields for the advanced search.
  5. In the Date Range section, configure the date range in which to search for job requests. The date on the left is the beginning date and the date on the right is the end date. For each date, click the Calendar button to the right of the text field to select the date and time.
    • Submitted between: Enter the start and end dates during which the job request was submitted.

    • Scheduled between: Enter the start and end dates during which the job request is scheduled to run.

    • Completed between: Enter the start and end dates during which the job request finished running.

  6. In the Run Time/Wait Time section, select the run or wait time of the job request for which you are searching, such as long or short running requests.
    • None: Select if no run or wait time is to be specified.

    • Long running requests: Select to search for requests running longer than a specified number of seconds, minutes, hours or days.

      In the Minimum Run Time text field, enter the lower limit of the time period for which the job request runs. From the dropdown list, select the required unit of time.

    • Short running requests that waited: Select to search for job requests running longer than a specified period of time and waiting less than a specified period.

      In the Maximum Run Time text field, enter the upper limit of the time period for which the job request runs. From the dropdown list, select Seconds, Minutes, Hours or Days.

      In the Minimum Wait Time text field, enter the lower limit of the time period during which the job request waits to run. From the dropdown list, select Seconds, Minutes, Hours or Days.

    • Waiting requests by time: Select to search for job requests waiting to run for a specified time period.

      In the Minimum Wait Time text field, enter the lower limit of the time period during which the job request waits to run. From the dropdown list, select Seconds, Minutes, Hours or Days.

      In the Maximum Wait Time text field, enter the upper limit of the time period during which the job request waits to run. From the dropdown list, select Seconds, Minutes, Hours or Days.

  7. In the Retry of Failed Runs section, use the Number of Retries dropdown list to select an operator such as equal to, greater than, greater than or equal to, and so on.

    In the text field, enter the number of retries.

  8. In the Error Type section, use the dropdown list to select the type of error:
    • Business: A job ends in a business error when it must abort prematurely due to unforeseen conditions, but is otherwise able to exit with its data in a consistent state. A job request might end in a business error as a result of an application setup or configuration condition, a functional conflict that requires an early exit or corrupt or inconsistent data. You cannot retry running a job request that ends in a business error.

    • System: A job ends in a system error when a technical problem occurs from which the job cannot recover, but otherwise exits on its own. Alternatively, the computer running the job crashes. Examples include table space issues and unhandled run-time exceptions. You can retry running a job request that ends in a system error.

  9. In the Request ECID/Correlation Flow ID section, use the Request ECID and Correlation Flow ID fields to specify the values for your request.
  10. Click Search to submit the job request search.

Configuring the Display of Columns in the Search Results Table

After running a search for job requests, you can configure the display of columns in the search results table.

To configure job request search results table display columns:

  1. Display the main Oracle Enterprise Scheduler Request search page and display the search interface. topicid:ess_searchlogmsgs_proc
  2. Show or hide columns.

    Click the View dropdown list and select Columns. then click column names to add check marks for the ones you want and remove check marks for those you do not.

    You can also instead click Manage Columns to view the Manage Columns dialog box, through which you can show or hide columns. Use the arrows between the columns to move column names from the Visible to the Hidden column, or vice versa.

  3. Sort columns.

    You can sort selected columns in ascending or descending order by clicking on the View dropdown list and selecting Sort. Click on Advanced to sort columns using multiple criteria.

  4. Reorder columns.

    You can reorder the columns in the table two ways:

    • Select View > Columns > Manage Columns

    • Select View > Reorder Columns

  5. Alternatively, display all columns by clicking the View dropdown list and select Columns, then Show All.

Creating or Editing Predefined Job Schedules

You can define and save schedules for later use in submitting job requests.

  1. Navigate to the Schedules page by clicking the Scheduling Service menu, selecting Job Requests, then selecting Define Schedules.

  2. On the Schedules page, you can choose one of the following actions:

    • To create a new schedule:

      1. From the Application dropdown list, select the name of the application for which you want to create a schedule.

      2. Click Create.

      3. Enter the following information:

        Name: Enter a name for the schedule. This is the name that appears when you assign the schedule to a job request.

        Package: Optionally enter the name of a Java package related to this schedule if it helps you find or group schedules.

        Description: Optionally enter a description.

      4. From the Frequency dropdown, select how often you want job requests using this schedule to run. Each frequency option has its own way to specify details for the option As you specify details, note that you can click Select date and time icons to specify time zones as well.

      5. Click OK.

    • To view details for an existing schedule:

      1. In the Results area, locate the schedule whose details you want to view.

      2. From the Application dropdown list, select the name of the application whose schedules you want to view.

      3. In the Name column, click the schedule's name.

      4. From the Schedule Details page, you can remove schedule times or click the Edit button to edit schedule details.

    • To edit an existing schedule:

      1. In the Name and Package fields, enter values to search for.

      2. Click Go to search.

      3. In the Results area, locate the schedule you want to edit.

      4. Select the schedule you want to edit, then click Edit.

      5. On the Edit Schedule page, edit details about the schedule.

      6. Click OK.

Viewing Job Request Details

You can view detailed information about an individual job request by clicking the job request ID or the request parent ID in job request search results. If the job is in an error state, an information box displays details regarding the error that occurred. For more on searching for job requests, see Searching for Oracle Enterprise Scheduler Job Requests.

You can take the following actions on an individual job request:

  • Display log information for the job request.

  • Display the job set and all child job requests.

  • Submit a job or job set request with parameters similar to those of a given job request.

  • Recover an incomplete job request.

To view job request details:

  1. Search for the relevant job requests as described in Searching for a Job Request Using Simple Search
  2. In the table displaying the job request search results, select the job request whose details you want to view.
  3. To view job request details, click the job request ID. Alternatively, click the parent ID associated with the job request to view the details of the job set with which the job is associated.

    In the job request details page, you can take any of the following actions.

    • Request Log: Select Action and then select Request Log to display log information for the job request.

    • SOA Composite Flow Trace: Select Action and then select SOA Composite Flow Trace to display the user interface for the flow of messages through composite and component instances. Use this command in cases when request status has not been updated from the SOA composite. The request's flow trace provides information related to activity in the composite.

      This action is available for asynchronous Java jobs where everything is in the same domain. If the job happens not to be a SOA composite web service invocation, then the flow trace user interface displays a "Trace not found" message.

    • Request Tree: Select Action and then select Request Tree to display the parent job set along with all related child jobs.

    • Cancel: Select Action and then select Cancel to cancel the job request.

    • Hold: Select Action and then select Hold to temporarily suspend the job request.

    • Resume: Select Action and then select Resume to resume a suspended job request.

    • Recover Stuck Request: Select Action and then select Recover Stuck Request to recover an incomplete job request that cannot continue.

    • Change Priority: Select Action and then select Change Priority to raise or lower the priority of the job request. Job requests with a higher priority are dispatched prior to job requests with lower priority.

    • Change Schedule: Select Action and then select Change Schedule to assign a different schedule to the job request.

    • Submit Like: Select Action and then select Submit Like to submit a job or job set with parameters similar to this one.

Holding and Resuming Oracle Enterprise Scheduler Job Requests

You can hold or resume a job request after it has been submitted.

To hold and resume a job request:

  1. Search for a job request. topicid:ess_searchjobrqst_procFor more information, see Searching for a Job Request Using Simple Search.
  2. In the table of job request search results, select the job request you want to hold.
  3. Click the Hold button.

    You can also hold a job request from the Request Details page by selecting Select Action > Hold.

  4. To resume the paused job request, select the job request and click Resume.

    You can also resume a job request from the Request Details page by selecting Select Action > Resume.

Canceling Oracle Enterprise Scheduler Job Requests

You can cancel an executable job request after it has been submitted. Executable job requests include job sets and job requests submitted without schedules. A job request can be canceled when it is not in a state of execution.

When initiating a job request cancellation, the resulting cancellation state depends on the current state of the job request. A job request that is not executing is set directly to CANCELLED state. A job request in RUNNING, PAUSED or COMPLETED states are placed in CANCELLING state following the initiation of request cancellation.

The final state of a request depends on the processing stage the job request at the point when cancellation has been initiated.

Table 4-1 displays the cancellation states applied to each executable request depending on its state when initiating cancellation.


Table 4-1 Executable Requests and Cancellation States

Job State When Initiating Cancellation New Cancellation State

WAIT

CANCELLED

READY

CANCELLED

HOLD

CANCELLED

BLOCKED

CANCELLED

PENDING_VALIDATION

CANCELLED

ERROR_AUTO_RETRY

CANCELLED

PAUSED

CANCELLING

RUNNING

CANCELLING

COMPLETED

CANCELLING

Any terminal state

No state change

CANCELLING

No state change

ERROR_MANUAL_RECOVERY

No state change


An executable request is processed in three major stages: pre-processor, executable and post-processor. Requests can be canceled at any of these stages. If the job request cannot complete all three stages, it transitions to CANCELLED.

This section contains the following topics:

Initiating Cancellation During Pre-Process Handler Execution

When initiating cancellation during the pre-processor stage, the state to which the job request transitions depends on the status returned by the pre-processor.

Table 4-2 displays the job state following cancellation initiation.


Table 4-2 Pre-processor States and States Following Cancellation Initiation

State Returned by the Pre-Processor State Following Cancellation Initiation

PROCEED

CANCELLED

DELAY

CANCELLED

WARN

CANCELLED

SYSTEM_ERROR

ERROR

BIZ_ERROR

ERROR


Initiating Cancellation During Synchronous Java Job Execution

When initiating cancellation during the job execution stage, the state to which the request transitions depends on the manner of completion.

Table 4-3 displays the job state following cancellation initiation.


Table 4-3 Returned Synchronous Java Job States and States Following Cancellation Initiation

State Returned by the Job State Following Cancellation Initiation

Normal return (success)

CANCELLED

ExecutionWarningException

CANCELLED

ExecutionPausedException

CANCELLED

ExecutionBizErrorException

ERROR

ExecutionErrorException

ERROR


Initiating Cancellation During Asynchronous Java Job Execution

When initiating cancellation during the job execution stage, the state to which the request transitions depends on the manner of completion.

Table 4-4 displays the job state following cancellation initiation.


Table 4-4 Returned Asynchronous Java Job States and States Following Cancellation Initiation

State Returned by the Job State Following Cancellation Initiation

SUCCESS

CANCELLED

PAUSE

CANCELLED

WARNING

CANCELLED

ERROR

ERROR

CANCEL

CANCELLED

UPDATE

No state change. Wait for further updates.

BIZ_ERROR

ERROR

ERROR_MANUAL_RECOVERY

ERROR_MANUAL_RECOVERY


Initiating Cancellation During PL/SQL Job Execution

If the job executable is executing, Oracle Enterprise Scheduler attempts to kill the running RDBMS Scheduler job. If the job is successfully killed, the request transitions to CANCELLED state. If the RDBMS Scheduler job completes before it can be killed, the state to which the job request transitions depends on the result of the job execution.

Table 4-5 displays the job state following cancellation initiation.


Table 4-5 Returned PL/SQL Job States and States Following Cancellation Initiation

State Returned by the Job State Following Cancellation Initiation

SUCCESS

CANCELLED

WARNING

CANCELLED

PAUSE

CANCELLED

BIZ_ERROR

ERROR

SYSTEM_ERROR

ERROR


Initiating Cancellation During Spawned Job Execution

If the spawned job is executing, Oracle Enterprise Scheduler attempts to kill the running process. If the process is successfully killed, the request transitions to a CANCELLED state. If the process completes before it can be killed, the state to which the request transitions depends on the result of the process execution.

Table 4-6 displays the job state following cancellation initiation.


Table 4-6 Returned Spawned Job States and States Following Cancellation Initiation

State Returned by the Job State Following Cancellation

SUCCESS

CANCELLED

WARNING

CANCELLED

PAUSE

CANCELLED

BIZ_ERROR

CANCELLED

SYSTEM_ERROR

CANCELLED


Canceling Parent Job Requests

A parent job request that is canceled transitions to a CANCELLING state until all child requests complete or have been canceled. The cancellation operation propagates to all eligible child job requests. For example, job set steps are canceled when the job set is canceled, sub-requests are canceled when the parent request is canceled and recurring executable job requests are canceled when the recurring parent is canceled. If a child job request is executable, it is subject to the rules described in the preceding sections. When all the child requests have completed, the parent request transitions to CANCELLED state.

Canceling a Child Job Request

A child job request may be an executable or a parent job request. When canceling a sub-request that completes in CANCELLED or another terminal state, the parent job request resumes as usual as long as the parent job request has not been canceled as well. The state of the sub-request does not affect the state of the parent request.

When canceling a step within a job set, the job set transitions to a CANCELLED state when the job set step transitions to a CANCELLED state. However, the job set may not revert to CANCELLED state if another job set step results in an error.

To cancel a job request:

  1. Search for a job request.
  2. In the table of job request search results, select the job request you want to cancel.
  3. Click the Cancel button.