3 Oracle Enterprise Scheduler Custom WLST Commands

Use the Oracle Enterprise Scheduler (ESS) commands to manage Oracle Enterprise Scheduler jobs. Many of the commands have analogous convenience shell scripts to make execution simpler. The native commands are described in Oracle Enterprise Scheduler Custom Native Commands and the shell scripts are described in Oracle Enterprise Scheduler Convenience Scripts.

Note:

To use these Oracle Enterprise Scheduler custom WLST commands, you must invoke the WLST script from the Oracle Common home. See "Using Custom WLST Commands" in the Administering Oracle Fusion Middleware.

This chapter includes the following sections:

3.1 Native Invocation

The following steps describe how to run the native WLST commands described in this chapter. Convenience shell scripts are available for many of these commands and are described in Oracle Enterprise Scheduler Convenience Scripts.

  1. Change directory to:

    $ORACLE_HOME/common/bin

  2. Place the following JAR archives are in your class path:
    • MW_HOME/oracle_common/modules/oracle.jmx_11.1.1/jmxframework.jar

    • MW_HOME/WLS_HOME/lib/weblogic.jar

    • MW_HOME/ORACLE_HOME/ess/lib/ess-admin.jar

  3. Execute one of the following commands:
    • wlst.sh (Linux)

    • wlst.cmd (Windows)

  4. Connect to the WLS Admin Server. For example:

    connect('weblogic', 'weblogic1', 't3://hostabc:7001')

  5. Invoke the WLST commands.

3.1.1 Enabling and Disabling Print Statements

You can explicitly enable or disable Oracle Enterprise Scheduler print output as shown below. For interactive use, you must enable printing. By default, Oracle Enterprise Scheduler printing is enabled.

  • enableESSPrint() — Enables print output for Oracle Enterprise Scheduler WLST commands.

  • disableESSPrint() — Disables print output for Oracle Enterprise Scheduler WLST commands.

3.1.2 Getting Help

While in the WLST console, you can get the list of available Oracle Enterprise Scheduler native commands by typing:

wls:/offline> help('OracleScheduler')

For usage information about any command, type help('command_name'). For example:

wls:/offline> help('manageSchedulerRuntimeConfig')

3.2 Oracle Enterprise Scheduler Custom Native Commands

Use the Oracle Enterprise Scheduler commands listed in Table 3-1 to manage the Oracle Enterprise Scheduler server, configuration, job requests, and logs. In the third column, "online" means the command can only be used when connected to a running administration server. "Offline" means the command can only be used when not connected to a running server.

Table 3-1 Oracle Enterprise Scheduling Service Basic Commands

Use this command... To... Use with WLST...

manageSchedulerRuntimeConfig

Add, modify, delete and display various configuration parameters.

Online

getSchedulerRequestContent

Get the log and output data files for a request after its execution is completed.

Online

querySchedulerRequests

Search and list requests based upon hosting application name, state or elapsed time of execution.

Online

manageSchedulerRequest

Manually cancel, recover, or complete request state.

Online

manageSchedulerServer

Start, stop or get status of the Oracle Enterprise Scheduler application running on the server.

Online

submitSchedulerRequest

Submit a job request to Oracle Enterprise Scheduler for execution.

Online

manageSchedulerJobDefn

Manage (show, create, delete, customize, update) an Oracle Enterprise Scheduler job definition.

Online

manageSchedulerSchedule

Manage (show, create, delete, update) a schedule definition in Oracle Enterprise Scheduler.

Online

3.2.1 Manage (Add/Delete/Modify/Get) Configuration Parameters

Command Category: Application Management Commands

Use with WLST: Online

3.2.1.1 Description

Adds, modifies, deletes and displays various configuration parameters.

3.2.1.2 Syntax

manageSchedulerRuntimeConfig(app,type,[operation],[name],[val])

Argument Definition

app

The hosting application name for managing run time configuration.

type

The property type. Can be either APP or ESS.

operation

Optional. The operation to perform. One of the following:

  • Add (add)

  • Modify (mod)

  • Delete (del)

  • Get (get)

  • Get All (getall)

name

(Optional for the getall operation) The name of the configuration parameter.

val

(Optional for the del/get/getall operations) Value to set for the parameter.

3.2.1.3 Examples
  • Add an ENV parameter foo with value "bar":

    manageSchedulerRuntimeConfig("myapp", "APP", operation="add", name="foo", val="bar")
    
  • Get the value of ENV parameter foo:

    manageSchedulerRuntimeConfig("myapp", "APP", operation="get", name="foo")
    
  • Get the list of all ENV parameters:

    manageSchedulerRuntimeConfig("myapp", "APP", operation="getall") manageSchedulerRuntimeConfig("myapp", "APP")
    
  • Change the value of the ENV parameter foo to "barone":

    manageSchedulerRuntimeConfig("myapp", "APP", operation="mod", name="foo", val="barone")
    
  • Delete the ENV parameter foo:

    manageSchedulerRuntimeConfig("myapp", "APP", operation="del", name="foo")
    
  • Show all parameters of type ESS:

    manageSchedulerRuntimeConfig("myapp", "ESS")
3.2.1.4 Related Shell Script

3.2.2 Get Log and Output Content of a Request

Command Category: Application Management Commands

Use with WLST: Online

3.2.2.1 Description

Gets the log and output data files for a request after its execution is completed.

3.2.2.2 Syntax

getSchedulerRequestContent(requestId,contentType,[logLines], [outDir])

Argument Definition

requestId

request ID

contentType

Type of content to handle. Can be one of the following;

  • LOG

  • OUTPUT

  • BINARY_OUTPUT

  • TEXT_OUTPUT

By default, the command checks for both BINARY_OUTPUT and TEXT_OUTPUT.

logLines

Optional. The number of lines to be read from the request log. The default value is 1000.

outDir

Optional. The absolute path of the directory in which to dump the output files. By default, the command uses the current directory.

3.2.2.3 Examples
  • Get the request log for request ID 123:

    getSchedulerRequestContent(123, "LOG")
    
  • Get all the output of request 123:

    getSchedulerRequestContent(123, "OUTPUT")
    
  • Get all the output of request 123 and save it in directory /tmp:

    getSchedulerRequestContent(123, "OUTPUT", outDir="/tmp")
    
  • Get all the text output of request 123 and save it in directory /tmp:

    getSchedulerRequestContent(123, "TEXT_OUTPUT", outDir="/tmp")
    
  • Get all the binary output of request 123 and save it in directory /tmp:

    getSchedulerRequestContent(123, "BINARY_OUTPUT", outDir="/tmp")
    
  • Get first 100 lines of the request log for request id 123:

    getSchedulerRequestContent(123, "LOG", logLines=100)
    
3.2.2.4 Related Shell Script

3.2.3 Search and List Requests

Command Category: Application Management Commands

Use with WLST: Online

3.2.3.1 Description

Searches and lists requests based upon hosting application name, state or elapsed time of execution. This command can be used to find long running requests.

3.2.3.2 Syntax

querySchedulerRequests([app],[state],[days],[hours],[minutes])

Argument Definition

app

Optional. The name of the hosting application

state

Optional. Specifies the request state. Can be one of the following:

  • WAIT

  • READY

  • RUNNING

  • COMPLETED

  • BLOCKED

  • HOLD

  • CANCELLING

  • EXPIRED

  • CANCELLED

  • ERROR

  • WARNING

  • SUCCEEDED

  • PAUSED

  • PENDING_VALIDATION

  • VALIDATION_FAILED

  • SCHEDULE_ENDED

  • FINISHED

  • ERROR_AUTO_RETRY

  • ERROR_MANUAL_RECOVERY

By default, the command specifies RUNNING.

days

Optional. Specifies time in days

hours

Optional. Specifies time in hours

minutes

Optional. Specifies time in hours

3.2.3.3 Examples
  • Get all the requests that are in the RUNNING state:

    querySchedulerRequests()
    or
    querySchedulerRequests(state="RUNNING")
    
  • Get all cancelled requests:

    querySchedulerRequests(state="CANCELLED")
    
  • Get all requests running for more than two days:

    querySchedulerRequests(days=2)
    
  • Get all requests running for more than 10 hours:

    querySchedulerRequests(hours=10)
    
  • Get all requests running for the application myapp:

    querySchedulerRequests(appName="myapp")
    
3.2.3.4 Shell Script

3.2.4 Manage Requests

Command Category: Application Management Commands

Use with WLST: Online

3.2.4.1 Description

Manually cancel, recover, complete, or get details about requests.

3.2.4.2 Syntax

manageSchedulerRequest(requestId,operation,[asyncStatus], [statusMessage])

Argument Definition

requestid

Specifies the request ID

operation

Specifies which one of the following operations to perform:

  • CANCEL

  • RECOVER

  • COMPLETE

  • GETDETAIL

asyncStatus

Required for the COMPLETE operation. Specifies the status to set for the given request. Must be one of the following:

  • SUCCESS

  • PAUSE

  • WARNING

  • ERROR

  • CANCEL

  • UPDATE

  • BIZ_ERROR

  • ERROR_MANUAL_RECOVERY

statusMessage

Required for the COMPLETE operation. Specifies the qualifying status message to describe the operation

3.2.4.3 Examples
  • Cancel request 123:

    manageSchedulerRequest(123, "CANCEL")
    
  • Recover request 123:

    manageSchedulerRequest(123, "RECOVER")
    
  • Complete request 123:

    manageSchedulerRequest(123, "COMPLETE", asyncStatus="ERROR", statusMessage="Completed by Admin")
3.2.4.4 Related Shell Script

3.2.5 Manage Oracle Enterprise Scheduler Servers

Command Category: Application Management Commands

Use with WLST: Online

3.2.5.1 Description

Starts, stops or gets the status of the Oracle Enterprise Scheduler application running on the server. Starting the Oracle Enterprise Scheduler application starts the Oracle Enterprise Scheduler processor thread so that request processing can start. Stopping Oracle Enterprise Scheduler stops or quiesces the Oracle Enterprise Scheduler processor so that no new requests are processed.

3.2.5.2 Syntax

manageSchedulerServer(operation)

Argument Definition

operation

Specifies which one of the following operations to perform:

  • START

  • STOP

  • STATUS

3.2.5.3 Examples
  • Stop Oracle Enterprise Scheduler:

    manageSchedulerServer("STOP")
    
  • Get the current state of the Oracle Enterprise Scheduler processor:

    manageSchedulerServer("STATUS")
    
3.2.5.4 Related Shell Script

3.2.6 Submit Job Requests to Oracle Enterprise Scheduler

Command Category: Application Management Commands

Use with WLST: Online

3.2.6.1 Description

Submit a job request to Oracle Enterprise Scheduler for execution.

3.2.6.2 Syntax

submitSchedulerRequest(appName,[jobName],[schMeth],[note], [schName],[RschName],[schDesc],[o_time],[begin_time], [frequency],[freqNum],[count],[end_time],[month],[week],[day], [date],[reqParams])

Note:

While a job definition must be predefined, the schedule can be defined in an ad-hoc manner using this command.

Argument Definition

appName

Name of the hosting application for the job.

jobName

Name of the job definition to be used for current request. The path name (including the package name) must be fully qualified. If it is not fully qualified, the command uses the default package: /oracle/apps/ess/custom.

schMeth

Optional. Specifies which one of the following scheduling methods to use:

  • IMMEDIATE (I) - No other parameter is required. This is the default method and is used if the schMeth argument is not specified.

  • ONCE (O) - If this method is used, the o_time argument is required.

  • SCHEDULE (S) - If this method is used, the schName argument is required.

  • RECURRING (R) - If this method is used, the RschName and frequency arguments are required.

    Note that the following arguments are only valid with the Recurring(R) method: schDesc, begin_time, freqNum, count, end_time, month, week, day, date and frequency.Parameter combinations based on 'frequency' value are:

    If you use the recurring (R) method with any of the following options: SECOND| MINUTE | HOUR | DAY | WEEK, you must use the following arguments: freqNum, begin_time, [count | end_time].

    If you use the recurring (R) method with the MONTH option, you must use the following arguments [{week day} | date] begin_time [count | end_time].

    If you use the recurring (R) method with the YEAR option, you must use the following arguments: [month ({week day} | date)] begin_time [count | end_time].

    Note that when you use the recurring (R) method, the schedule is stored in the MDS for future use and the storage location is based on the schedule name provided.

See Examples for examples.

note

Optional. Specifies a short description for the job request.

schName

Optional. Specifies the name of the predefined schedule definition. The path name (including the package name) must be fully qualified. If it is not fully qualified, the command uses the default package: /oracle/apps/ess/custom.

RschName

Optional. Specifies the name of the schedule if you use the recurring (R) option to the schMeth argument to define the schedule.

schDesc

Optional. Specifies a string value that describes the ad-hoc schedule. By default, the value is "Custom Ad-Hoc Schedule".

o_time

Optional. Specifies the time for a "one time" execution. The format is: HH:MM:SS:DD:MM:YYYY

begin_time

Optional. Specifies the start time for a recurring schedule. The format is: HH:MM:SS:DD:MM:YYYY

frequency

Optional. Specifies the frequency of a recurring schedule. The valid values are: SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, YEAR

freqNum

Optional. An integer value that specifies repeat interval of a recurring schedule. The default value is "1".

count

Optional. Specifies the maximum number of repetitions for a request.

end_time

Optional. Specifies the end time for a recurring schedule. The format is: HH:MM:SS:DD:MM:YYYY

month

Optional. Specifies the month of the year if frequency is specified as YEARLY. Valid values are: 1-12.

week

Optional. Specifies the week of a month. Valid values are: 1-6, LAST.

day

Optional. Specifies the day of the week. Valid values are: 1-7, where "1" represents Monday.

date

Optional. Specifies a specific day of month. Valid values are: 1-31, LAST

reqParams

Optional. Specifies other request parameters/properties specified as a dictionary.

3.2.6.3 Examples

The following variables are used in these examples:

Variable Value

HOSTING_APP

EssDemoApp

SCHEDULE_NAME

/oracle/apps/ess/custom/MySch

JOB_DEF_NAME

/oracle/apps/ess/demopackage/BasicJavaJob

  • Submit a request for immediate job execution (one-time only):

    submitSchedulerRequest(HOSTING_APP, JOB_DEF_NAME)
    
  • Submit a request for one-time job execution at a specified time:

    submitSchedulerRequest(HOSTING_APP, JOB_DEF_NAME, schMeth='O',  o_time='21:10:30:03:05:2012')
    
  • Submit a job request with a recurring schedule. The recurrence is: Execution recurs every 2 minutes, starting at time 21:10:30 on 03 May 2012, until 3 iterations complete. The additional request parameters are: reqName =test and PRIORITY= 10. This recurrence also persists in the MDS repository for future use.

    submitSchedulerRequest(HOSTING_APP, JOB_DEF_NAME, schMeth='R', RschName=SCHEDULE_NAME, frequency='MINUTE', freqNum=2, count=3, begin_time='21:10:30:03:05:2012', reqParams={'reqName':'test','PRIORITY':'10'})
    
  • Submit a job request using a predefined schedule

    submitSchedulerRequest(HOSTING_APP, JOB_DEF_NAME, schMeth='S',  schName=SCHEDULE_NAME)
    
  • Submit a job request with a monthly recurring schedule. The description for the request is "Request with monthly schedule". The recurring schedule name and description are specified using RschName and schDesc respectively.

    submitSchedulerRequest(HOSTING_APP, JOB_DEF_NAME, note='Request with monthly schedule', schMeth='R', RschName=SCHEDULE_NAME+'1', schDesc='Monthly_schedule', frequency='MONTH', freqNum=2, begin_time='21:10:30:03:05:2012', week=5, day=4, end_time='21:10:30:04:05:2013')
    
  • Submit a job request with a yearly recurring schedule. The description for the request is "Request with yearly schedule". The recurring schedule name and description are provided by RschName and schDesc respectively.

    Execution recurs every three years, on the last day of May (31st), starting at 21:10:30 on 03 May 2012, and iterates five times.

    submitSchedulerRequest(HOSTING_APP, JOB_DEF_NAME,note='Request with yearly schedule',schMeth='R',RschName=SCHEDULE_NAME+'2', schDesc='Yearly_schedule', frequency='YEAR',freqNum=3,begin_time='21:10:30:03:05:2012',month=5, date='LAST',count=5)
    
  • Submit a job request with an hourly recurring schedule. This schedule is stored in the MDS. Recurrence is set to repeat every hour starting from the current time.

    submitSchedulerRequest(HOSTING_APP, JOB_DEF_NAME,schMeth='R', RschName=SCHEDULE_NAME,schDesc='HOURLY_schedule',frequency='HOUR')
    
3.2.6.4 Related Shell Script

3.2.7 Manage Oracle Enterprise Scheduler Job Definitions

Command Category: Application Management Commands

Use with WLST: Online

3.2.7.1 Description

Manage (show, create, delete, customize, update) an Oracle Enterprise Scheduler job definition.

If operation is set to SHOW and if jobName is specified, the command returns the details of this particular job definition; otherwise, the command shows a list of all job definitions that are part of the application.

If operation is set to CREATE, the command returns the MetadataObjectID of the newly created job definition.

If operation is set to DELETE, CUSTOMIZE or UPDATE, the command returns 0 or -1, depending on whether the operation succeeds or fails.

3.2.7.2 Syntax

manageSchedulerJobDefn(operation,appName,[jobName],[jobType], [desc],[props])

Argument Definition

operation

Specifies which of the following operations to perform on the job:

  • SHOW (S)

    Displays the list of job definitions that are part of a particular application. If a job name is specified, it shows the details of only that job definition.

    If this operation is used, the appName argument is required and jobName is optional.

  • CREATE (N)

    Creates a new job definition in the namespace of the relevant application (supplied as a parameter) in MDS.

    If this operation is used, the appName, jobName, and jobType arguments are required and desc and props are optional.

  • DELETE (D)

    Deletes the specified job definition from the MDS.

    If this operation is used, the appName andjobName arguments are required.

  • CUSTOMIZE (C)

    Modifies the customizable properties of an existing job definition. The following customizable properties are available: SYS_retries, SYS_priority, SYS_requestCategory, SYS_request_timeout, enableTrace, enableTimeStatistics.

    If this operation is used, the appName, jobName, and props arguments are required.

  • UPDATE (U)

    Updates an existing job definition with the specified property values (existing parameters persist if not overridden).

    If this operation is used, the appName, jobName, and one or both of the desc and props arguments are required.

appName

Specifies the logical name of the job's hosting application.

jobName

Optional. Specifies the name of the job definition. For the create, delete, or update operations, a default package /oracle/apps/ess/custom/ is prepended to the specified name.

jobType

Optional. Specifies the name of the job type to be used to create a new job definition. If the name does not contain the package, the following default value is prefixed to the name: /oracle/as/ess/core/.

desc

Optional. Specifies a description for a new job definition.

props

Optional. Specifies other request parameters/properties specified as a dictionary.

Note:

  • For job definition creation, deletion and update, the value of the jobName argument can be a fully qualified name (that includes the package name); however, the default package /oracle/apps/ess/custom is always prefixed to it.

  • As indicated by the previous note, you can only create/delete/update the job definitions present in the /oracle/apps/ess/custom namespace; prepackaged job definitions cannot be modified.

  • If you do not provide a fully qualified path name for the jobType argument, a default package (/oracle/as/ess/core/) is prefixed to the name.

3.2.7.3 Examples

The following variables are used in these examples:

Variable Value

HOSTING_APP

EssNativeHostingApp

JOB_DEF_PREDEF

/oracle/apps/ess/TestJob

JOB_DEF_NAME

TestJob_wlst

JOB_TYPE_NAME

JavaJobType

JOB_DESC

My WLST Test Defn

PARAMS

'SYS_retries':1,'myParam':'xyz'

  • Show all job definitions present in the namespace of HOSTING_APP:

    manageSchedulerJobDefn('SHOW',HOSTING_APP)
    
  • Show the details of the job definition (JOB_DEF_PREDEF) part of HOSTING_APP:

    manageSchedulerJobDefn('SHOW',HOSTING_APP,jobName=JOB_DEF_PREDEF)
    
  • Create the new job definition /oracle/apps/ess/custom/TestJob_wlst in the namespace of HOSTING_APP with the jobType value of /oracle/as/ess/core/JavaJobType:

    manageSchedulerJobDefn('CREATE',HOSTING_APP,jobName=JOB_DEF_NAME, jobType=JOB_TYPE_NAME)
    
  • Create a new job definition named /oracle/apps/ess/custom/TestJob_wlst in the HOSTING_APP namespace with the jobType /oracle/as/ess/core/JavaJobType and a description with the value of JOB_DESC:

    manageSchedulerJobDefn('CREATE',HOSTING_APP,jobName=JOB_DEF_NAME,jobType=JOB_TYPE_NAME,desc=JOB_DESC)
    
  • Create a new job definition named /oracle/apps/ess/custom/TestJob_wlst in the HOSTING_APP namespace with the jobType /oracle/as/ess/core/JavaJobType and a description and parameters defined by JOB_DESC and PARAMS:

    manageSchedulerJobDefn('CREATE',HOSTING_APP,jobName=JOB_DEF_NAME,jobType=JOB_TYPE_NAME,desc=JOB_DESC,props=PARAMS)
    
  • Update the job definition /oracle/apps/ess/custom/JOB_DEF_NAME with the new description JOB_DESC:

    manageSchedulerJobDefn('UPDATE',HOSTING_APP,jobName=JOB_DEF_NAME,desc=JOB_DESC)
    
  • Update the job definition /oracle/apps/ess/custom/JOB_DEF_NAME with the properties PARAMS:

    manageSchedulerJobDefn('UPDATE',HOSTING_APP,jobName=JOB_DEF_NAME,props=PARAMS)
    
  • Delete the job definition /oracle/apps/ess/custom/JOB_DEF_NAME in HOSTING_APP:

    manageSchedulerJobDefn('DELETE',HOSTING_APP,jobName=JOB_DEF_NAME)
    
  • Customize the prepackaged job definition JOB_DEF_PREDEF in HOSTING_APP with the customizable properties SYS_retries and SYS_priority:

    manageSchedulerJobDefn('CUSTOMIZE',HOSTING_APP,jobName=JOB_DEF_PREDEF,props={'SYS_retries':2,'SYS_priority':3})
3.2.7.4 Related Shell Script

3.2.8 Manage Oracle Enterprise Scheduler Schedule Definitions

Command Category : Application Management Commands

Use with WLST: Online

3.2.8.1 Description

Manage (show, create, delete, update) a schedule definition in Oracle Enterprise Scheduler.

If operation is set to SHOW and if schName is specified, the command shows the details of this particular schedule definition; otherwise, the command shows a list of all schedule definitions that are part of the application. The command returns 0 or -1 depending on whether the operation succeeds or fails.

If operation is set to CREATE, the command returns the MetadataObjectID of the newly created schedule definition.

If operation is set to DELETE or UPDATE, the command returns 0 or -1, depending on whether the operation succeeds or fails.

3.2.8.2 Syntax

manageSchedulerSchedule(operation,appName,[schName],[schDesc], [begin_time],[frequency],[interval],[count],[end_time],[month], [week],[day],[date])

Argument Definition

operation

Specifies which of the following operations to perform on the job:

  • SHOW (S)

    Displays the list of schedule definitions that are part of a particular application.

    If this operation is used, the appName argument is required and schName is optional.

  • CREATE (C)

    Creates a new schedule definition in the namespace of the relevant application (supplied as a parameter) in MDS.

    If this operation is used, the appName, schName, and frequency arguments are required and schDesc is optional.

  • DELETE (D)

    Deletes the specified job definition from the MDS.

    If this operation is used, the appName andschName arguments are required.

  • UPDATE (U)

    Updates an existing schedule definition with the specified property values (existing parameters persist if not overridden).

    If this operation is used, the appName, schName, and one or both of the schDesc and frequency arguments are required.

appName

Specifies the logical name of the job's hosting application.

schName

Optional. Specifies the name of the schedule definition. For the create, delete, and update operations, a default package named /oracle/apps/ess/custom/ is prepended to the name provided.

schDesc

Optional. Specifies a description for the schedule definition when creating or updating a definition.

begin_time

Optional. Specifies the start time for a recurring event. The format is: HH:MM:SS:DD:MM:YYYY

frequency

Optional. Frequency of recurrence. Valid values are: SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, YEAR

If you use any of the following options: SECOND, MINUTE, HOUR, DAY, WEEK, you must use the following arguments: interval, begin_time, [count | end_time].

If you use the MONTH option, you must use the following arguments [(week day) | date] [begin_time ] [count | end_time].

If you use the YEAR option, you must use the following arguments: [month ({week day} | date)] [begin_time] [count | end_time].

interval

Optional. Specifies the repeat interval used with the frequency option. This is an integer value with a default value of 1.

count

Optional. Specifies the maximum number of repetitions for a request. This value is an integer.

end_time

Optional. Specifies the end time for recurrence. Format: HH:MM:SS:DD:MM:YYYY

month

Optional. Specifies the month of the year if frequency is set to YEAR. Valid values are 1-12.

week

Optional. Specifies the week of a month. Valid values are 1-6 and LAST.

day

Optional. Specifies the day of a week. Valid values are 1-7, where 1 represents Monday.

date

Optional. Specifies a day of month. Valid values are 1-31 and LAST.

3.2.8.3 Examples

The following variables are used in these examples:

Variable Value

HOSTING_APP

EssNativeHostingApp

PREDEF_SCHEDULE

/oracle/apps/ess/demo/seeded/MyPredefinedSch

SCHEDULE_NAME

MyWlstSchedule

SCH_DESC

Description for WLST test schedule

  • Show all schedule definitions present in the namespace of HOSTING_APP:

    manageSchedulerSchedule('SHOW',HOSTING_APP)
    
  • Show the details of the HOSTING_APP schedule definition PREDEF_SCHEDULE:

    manageSchedulerSchedule('SHOW',HOSTING_APP,schName=PREDEF_SCHEDULE)
    
  • Create a new recurring schedule definition named /oracle/apps/ess/custom/MyWlstSchedule in the namespace of HOSTING_APP and with the description SCH_DESC. The recurring schedule is:

    • Occur every 2 minutes

    • Start at 21:10:30 on May 03, 2012

    • Complete 3 iterations

    manageSchedulerSchedule('CREATE',HOSTING_APP,schName=SCHEDULE_NAME, schDesc=SCH_DESC,frequency='MINUTE',interval=2,count=3, begin_time='21:10:30:03:05:12')
    
  • Create a new recurring schedule definition named /oracle/apps/ess/custom/MyWlstSchedule in the namespace of HOSTING_APP. The recurring schedule is:

    • Occur every 2 months on Thursday of the 5th week (if applicable)

    • Start at 21:10:30 on May 03, 2012

    • Continue until 21:10:30 on May 04, 2013

      manageSchedulerSchedule('CREATE',HOSTING_APP,schName=SCHEDULE_NAME, frequency='MONTH',interval=2, begin_time='21:10:30:03:05:12', week=5, day=4, end_time='21:10:30:04:05:13')
      
  • Create a new recurring schedule definition named /oracle/apps/ess/custom/MyWlstSchedule in namespace of HOSTING_APP. The recurring schedule is:

    • Occur every 3 years, on the last day of May (May 31st)

    • Start at 21:10:30 on May 03, 2012

    • Complete 5 iterations

    manageSchedulerSchedule('CREATE',HOSTING_APP,schName=SCHEDULE_NAME, frequency='YEAR',interval=3,begin_time='21:10:30:03:05:12',month=5,date='LAST',count=5)
    
  • Create a new recurring schedule definition named /oracle/apps/ess/custom/MyWlstSchedule in the namespace of HOSTING_APP. The recurring schedule is: occur hourly, starting now.

    manageSchedulerSchedule('CREATE',HOSTING_APP,schName=SCHEDULE_NAME, frequency='HOUR')
    
  • Update the schedule definition named /oracle/apps/ess/custom/SCHEDULE_NAME with the description SCH_DESC. The recurring schedule remains unchanged.

    manageSchedulerSchedule('UPDATE',HOSTING_APP,schName=SCHEDULE_NAME,schDesc=SCH_DESC)
    
  • Update the schedule definition named /oracle/apps/ess/custom/SCHEDULE_NAME with the following new recurring schedule: Occur every minute.

    manageSchedulerSchedule('UPDATE',HOSTING_APP,schName=SCHEDULE_NAME, frequency='MINUTE')
    
  • Delete the HOSTING_APP schedule definition named /oracle/apps/ess/custom/SCHEDULE_NAME.

    manageSchedulerSchedule('DELETE',HOSTING_APP,schName=SCHEDULE_NAME)
3.2.8.4 Related Shell Script

3.3 Oracle Enterprise Scheduler Batch Delete Requests

Job request data is kept as records in the Oracle Enterprise Scheduler runtime store tables. These job requests records are not removed from the runtime store until they are physically purged by a database administrator using SQL purge scripts. A request must be logically deleted before it can be physically purged. Oracle Enterprise Scheduler provides two ways to delete a request, either by a user performing a delete operation for a specific request, or by an Oracle Enterprise Scheduler administrator submitting a batch delete request.

The batch delete feature provides a way for an Oracle Enterprise Scheduler administrator to delete requests in a batch fashion. An Oracle Enterprise Scheduler administrator defines a set of delete criteria and submits a batch delete request using the Oracle Enterprise Scheduler runtime MBean interface. The delete criteria for the batch job are specified in the form of application request parameters. The submitted batch delete request uses a pre-defined job definition for a Java executable that is supplied by Oracle Enterprise Scheduler. The batch delete job definition metadata is defined in the ESSAPP metadata repository.

When the batch delete job runs, it determines which completed absolute parent and instance parent requests satisfy the delete criteria specified for that batch job request and deletes the request hierarchy for those requests. The batch delete job is executed in the context of ESSAPP.

3.3.1 The batchDeleteSchedulerRequest Command

Command Category: Application Management Commands

Use with WLST: Online

3.3.1.1 Description

Submits a request for a batch delete job. You can use either a pre-defined schedule (in MDS) or specify a one-time execution time. If neither of these is specified, the request starts immediately. The request parameters are used to specify the delete criteria.

When the batch delete job runs, it determines which completed absolute parent and instance parent requests satisfy the delete criteria specified for that batch job request. The batch delete job deletes the request hierarchy for those requests.

3.3.1.2 Syntax

batchDeleteSchedulerRequests([desc],[schId],[start],[end], [params])

Argument Definition

desc

Optional. Specifies a description for the batch delete request.

schId

Optional. Specifies the fully qualified name of the schedule (pre-defined) to use. The default package, if none is specified, is: /oracle/as/ess/essapp/custom/.

start

Optional. Specifies the time to start the request. Format: HH:MM:SS:DD:MM:YYYY

end

Optional. The time the request should terminate. Format: HH:MM:SS:DD:MM:YYYY

params

Optional. Request parameters specified as a dictionary. Batch Delete Parameters describes the parameters.

3.3.1.2.1 Batch Delete Parameters

A batch delete job uses application request parameters to specify the batch delete criteria and basic result information for that delete job.The class oracle.as.scheduler.job.BatchDeleteProperty.java defines constants for the batch delete parameters. The delete criteria parameters are described in the following two tables.

Parameter Data Type Constants

CriteriaApplication

String

BatchDeleteProperty.CRITERIA_APPLICATION

CriteriaProduct

String

BatchDeleteProperty.CRITERIA_PRODUCT

CriteriaJobDefn

String

BatchDeleteProperty.CRITERIA_JOBDEFN

CriteriaJobExecType

String

BatchDeleteProperty.CRITERIA_JOBEXECTYPE

CriteriaSubmitUser

String

BatchDeleteProperty.CRITERIA_SUBMIT_USER

CriteriaMinimumAge

Integer

BatchDeleteProperty.CRITERIA_MINIMUM_AGE

CriteriaRetentionAgeSuccess

Integer

BatchDeleteProperty.CRITERIA_RETENTION_AGE_SUCCESS

CriteriaRetentionAgeError

Integer

BatchDeleteProperty.CRITERIA_RETENTION_AGE_ERROR

CriteriaProcessLimit

Integer

BatchDeleteProperty.CRITERIA_RETENTION_AGE_WARNING

CriteriaRetentionAgeCancel

Integer

BatchDeleteProperty.CRITERIA_RETENTION_AGE_CANCEL

CriteriaProcessLimit

Long

BatchDeleteProperty.CRITERIA_PROCESS_LIMIT

Parameter Default Value Description

CriteriaApplication

null (none)

Specifies the application for which requests are to be deleted. If null, this parameter is ignored and is not used as part of the delete criteria.

CriteriaProduct

null (none)

Specifies the product for which requests are to be deleted. If null, this parameter is ignored and is not used as part of the delete criteria.

CriteriaJobDefn

null (none)

Specifies the string representation of the job definition MetadataObjectId for which requests are to be deleted. If null, this parameter is ignored and is not used as part of the delete criteria.

CriteriaJobExecType

null (none)

Specifies the string representation of the job execution type for which requests are to be deleted. If null, this parameter is ignored and is not used as part of the delete criteria.

CriteriaSubmitUser

null (none)

Specifies the submitting user for which requests are to be deleted. If null, this parameter is ignored and is not used as part of the delete criteria.

CriteriaMinimumAge

null (none)

Specifies a minimum age, in days, before a request that completed is eligible for deletion.

CriteriaRetentionAgeSuccess

null (none)

Specifies a minimum age, in days, before a request that completed as success is eligible for deletion. If this parameter value is null, then the value of CriteriaMinimumAge is used.

CriteriaRetentionAgeError

null (none)

Specifies a minimum age, in days, before a request that completed as a failure is eligible for deletion. If this parameter value is null, then the value of CriteriaMinimumAge is used.

CriteriaProcessLimit

null (none)

Specifies a minimum age, in days, before a request that completed with a warning is eligible for deletion. If this parameter value is null, then the value of CriteriaMinimumAge is used.

CriteriaRetentionAgeCancel

null (none)

Specifies a minimum age, in days, before a request that was canceled is eligible for deletion. If this parameter value is null, then the value of CriteriaMinimumAge is used.

CriteriaProcessLimit

null (none)

Specifies the maximum number of requests to be processed by the batch delete job. If null or zero (0), there is no limit. The default value is zero (0).

3.3.1.3 Examples

  • Delete all purgeable requests:

    batchDeleteSchedulerRequests()
    
  • Delete all purgeable requests in the application ESS_NATIVE_HOSTING_APP_LOGICAL_NAME:

    batchDeleteSchedulerRequests(desc='My purge for ESS NativeApp',params={'CriteriaApplication':'ESS_NATIVE_HOSTING_APP_LOGICAL_NAME'})
    
  • Delete all purgeable requests in the application ESS_NATIVE_HOSTING_APP_LOGICAL_NAME for which the job definition is /oracle/apps/ess/custom/MyDef:

    batchDeleteSchedulerRequests(desc='My purge for ESS NativeApp',params={'CriteriaApplication':'ESS_NATIVE_HOSTING_APP_LOGICAL_NAME','CriteriaJobDefn':'JobDefinition://oracle/apps/ess/custom/MyDef'})
    
  • Delete all purgeable requests in the application ESS_NATIVE_HOSTING_APP_LOGICAL_NAME for which the job type is JAVA_TYPE:

    batchDeleteSchedulerRequests(desc='My purge for ESS NativeApp', params={'CriteriaApplication':'ESS_NATIVE_HOSTING_APP_LOGICAL_NAME', 'CriteriaJobExecType':'JAVA_TYPE'})
    
  • Submit batch delete job request using the schedule /oracle/as/ess/essapp/custom/WeeklySch:

    batchDeleteSchedulerRequests(desc='Purge using WeekSch',schId='/oracle/as/ess/essapp/custom/WeeklySch')
3.3.1.4 Related Shell Script

3.4 Work Allocation Commands

Table 3-2 shows the WLST commands Oracle Enterprise Scheduler provides for work allocation.

Table 3-2 Oracle Enterprise Scheduler Work Allocation Commands

Command Description

addProcessorBinding

Bind a work assignment

createWorkshift

Create a custom workshift

deleteWorkAssignment

Delete work assignment metadata

deleteWorkshift

Delete workshift metadata

queryProcessorBindings

Query all processor bindings

queryWorkAssignments

Query work assignment metadata

queryWorkSchedules

Query schedule metadata for work allocation

queryWorkshifts

Query workshift metadata

removeProcessorBinding

Remove a processor binding

updateWorkshift

Update workshift resources

3.4.1 addProcessorBinding

Command Category: Application Management Commands

Use with WLST: Online

3.4.1.1 Description

Binds a work assignment to the current Oracle Enterprise Scheduler processor.

3.4.1.2 Syntax

addProcessorBinding(workAssignmentName,server=serverName, [isExclusive=None][scope])

Argument Definition

workAssignmentName

Specifies the name of the work assignment to bind.

server

Specifies the name of the server to which to bind.

isExclusive

Optional. Specifies whether the binding is exclusive (true). The default value is false.

scope

Optional. Can be server, group, or global. The default value is server.

  • server binds to the specified server.

  • group binds to the processing group of the specified server.

  • global binds globally for all current and future servers in the isolation group.

3.4.1.3 Examples
  • Bind a work assignment to a processor:

    addProcessorBinding('mypkg/MyTestWA', server='ess_server1')
    
  • Bind a work assignment to a processor in exclusive mode.

    addProcessorBinding('SimpleApp', server='ess_server1', isExclusive='true')
    
  • Bind a work assignment to a processor globally.

    addProcessorBinding('SimpleApp',server='ess_server1',scope='global')
    

3.4.2 createWorkshift

Command Category: Application Management Commands

Use with WLST: Online

3.4.2.1 Description

Creates a custom workshift that specifies a time window and the resources to be used during that window.

3.4.2.2 Syntax

createWorkshift(workshiftName,alloc=allocation, plsqlLimit=limit,asyncJavaLimit=limit,[description=None], [schedName=None],[duration=None])

Argument Definition

workshiftName

Specifies the name of the workshift to create.

alloc

Specifies the maximum number of threads that can be allocated on each server instance.

plsqlLimit

Specifies the maximum number of PL/SQL jobs that can be active in the isolation group. Use -1 to specify no limit.

asyncJavaLimit

Specifies the number of async Java jobs that can be active in the isolation group. Use -1 to specify no limit.

description

Optional. Specifies a description for the workshift.

schedName

Optional. Specifies the name of the schedule to use for the workshift.

  • If the schedule name is specified, the duration argument is required.

  • If the schedule name is not specified, the workshift is 24x7

duration

Specifies the number of minutes the workshift is active each time the schedule runs. Required if the schedName argument is used.

3.4.2.3 Example
  • Create a 24x7 workshift in a specific custom package:

    createWorkshift('mypkg/SampleWorkshift', alloc=5, plsqlLimit=15, asyncJavaLimit=10)
    

3.4.3 deleteWorkAssignment

Command Category: Application Management Commands

Use with WLST: Online

3.4.3.1 Description

Deletes an Oracle Enterprise Scheduler work assignment in the custom namespace.

Note:

A work assignment that is bound cannot be deleted.

3.4.3.2 Syntax

deleteWorkAssignment(workAssignmentName)

Argument Definition

workAssignmentName

Specifies the name of the custom work assignment to delete.

3.4.3.3 Example
  • Delete a custom work assignment:

    deleteWorkAssignment('MyTestWA')

3.4.4 deleteWorkshift

Command Category: Application Management Commands

Use with WLST: Online

3.4.4.1 Description

Deletes an Oracle Enterprise Scheduler workshift in the custom namespace.

Note:

A workshift that is in use by an on-board tenant or any bound work assignment cannot be deleted.

3.4.4.2 Syntax

deleteWorkshift(workshiftName)

Argument Definition

workshiftName

Specifies the name of the custom workshift to delete.

3.4.4.3 Example
  • Delete a custom workshift:

    deleteWorkshift('mypkg/TenantWorkshift1')

3.4.5 queryProcessorBindings

Command Category: Application Management Commands

Use with WLST: Online

3.4.5.1 Description

Gets processor bindings.

3.4.5.2 Syntax

queryProcessorBindings(server=serverName)

Argument Definition

server

Specifies the name of the server to query.

3.4.5.3 Example
  • Get all bindings:

    queryProcessorBindings(server='ess_server1')

3.4.6 queryWorkAssignments

Command Category: Application Management Commands

Use with WLST: Online

3.4.6.1 Description

Gets all custom and internal work assignments. Prints the work assignment id. Details include workshift IDs and specialization.

3.4.6.2 Syntax

queryWorkAssignments([name=None],[package=None],[options=None])

Argument Definition

name

Optional. Specifies a work assignment name.

package

Optional. Specifies a work assignment package.

options

Optional. Comma-separated list of one or more of the following options:

  • nameLike

    Query for a name that contains the specified name.

  • pkgLike

    Query for a package that contains the specified package.

  • details

    Print additional details.

3.4.6.3 Examples
  • Print all work assignments:

    queryWorkAssignments()
    
  • Print details for work assignments whose name contains "Simple":

    queryWorkAssignments(name='Simple', options='nameLike,details')
    

3.4.7 queryWorkSchedules

Command Category: Application Management Commands

Use with WLST: Online

3.4.7.1 Description

Gets all schedules for work allocation and prints the schedule ID. Details include recurrence, exclusions, inclusions.

3.4.7.2 Syntax

queryWorkSchedules([name=None],[package=None],[options=None])

Argument Definition

name

Optional. Specifies the schedule name.

package

Optional. Specifies the schedule package.

options

Optional. Comma-separated list of one or more of the following options:

  • nameLike

    Query for a name that contains the specified name.

  • pkgLike

    Query for a package that contains the specified package.

  • details

    Print additional details.

3.4.7.3 Examples
  • Get all schedules:

    queryWorkSchedules()
    
  • Get details for an hourly schedule:

    queryWorkSchedules(name='Hourly', options='details')
    

3.4.8 queryWorkshifts

Command Category: Application Management Commands

Use with WLST: Online

3.4.8.1 Description

Gets all workshifts and prints the workshift ID. Details include thread allocation and async limits.

3.4.8.2 Syntax

queryWorkshifts([name=None], [package=None], [options=None])

Argument Definition

name

Optional. Specifies the workshift name.

package

Optional. Specifies the workshift package.

options

Optional. Comma-separated list of one or more of the following options:

  • nameLike

    Query for a name that contains the specified name.

  • pkgLike

    Query for a package that contains the specified package.

  • details

    Print additional details.

3.4.8.3 Examples
  • Get all workshifts:

    queryWorkshifts()
    
  • Get workshifts whose package contains '"test" and print the details:

    queryWorkshifts(package='test', options='pkgLike,details')
    

3.4.9 removeProcessorBinding

Command Category: Application Management Commands

Use with WLST: Online

3.4.9.1 Description

Removes a local or global processor binding.

3.4.9.2 Syntax

removeProcessorBinding(workAssignmentName, server=serverName)

Argument Definition

workAssignmentName

Specifies the name of the work assignment to unbind.

server

Specifies the name of the server from which to unbind.

3.4.9.3 Example
  • Remove a binding:

    removeProcessorBinding('mypkg/MyTestWA', server='ess_server1')
    

3.4.10 updateWorkshift

Command Category: Application Management Commands

Use with WLST: Online

3.4.10.1 Description

Update async limits and thread allocation for a custom workshift.

3.4.10.2 Syntax

updateWorkshift(workshiftName,[alloc=None],[plsqlLimit=None], [asyncJavaLimit=None])

Argument Definition

workshiftName

Specifies the name of the workshift to update.

alloc

Optional. Specifies the maximum local thread allocation.

plsqlLimit

Optional. Specifies the maximum number of PL/SQL jobs that can be active in the isolation group. Use -1 to specify that there no limit.

asyncJavaLimit

Optional. Specifies the maximum number of async Java jobs that can be active in the isolation group. Use -1 to specify that there is no limit.

Note:

You must specify least one of the optional arguments.

3.4.10.3 Examples
  • Update the PL/SQL limit for the workshift mypkg/SampleWorkshift.

    updateWorkshift('mypkg/SampleWorkshift', plsqlLimit=20)
    
  • Update both async limits for the workshift mypkg/SampleWorkshift.

    updateWorkshift('mypkg/SampleWorkshift', plsqlLimit=25, asyncJavaLimit=50)
    

3.5 Oracle Enterprise Scheduler Diagnostic Dumps

Oracle Enterprise Scheduler provides a set of diagnostic dumps that facilitate the diagnosis of problems. These dumps are built on the Oracle Diagnostics Framework. Oracle Enterprise Scheduler problems are typically exposed when a request does not start or complete as expected. In such a scenario, the user can manually create Oracle Enterprise Scheduler diagnostic dumps and use the information in the dumps to help diagnose the problem. One way to easily create all Oracle Enterprise Scheduler diagnostic dumps is by creating an incident with a specific message ID, as described in Creating an XXX Oracle Enterprise Scheduler Incident using WLSTXXX.

The following are the Oracle Enterprise Scheduler diagnostic dump-related commands. They are described in The Dump Commands.

  • executeDump

  • listDumps

  • describeDump

You control the behavior of the dump by specifying the dump name as an argument to the command. The valid dump names are described in Table 3-3 and examples of their use are shown in Dump Examples.

Table 3-3 Oracle Enterprise Scheduler Diagnostic Dumps

Dump Name Description

ess.applications

Dumps all registered Oracle Enterprise Scheduler applications on every server in the isolation group. An application that is registered on multiple servers appears multiple times in this dump.

For an application on a given server, you can check what version is registered, whether the application is active, and when it was last activated.

ess.bindings

Dumps current and inactive processor bindings for this instance, including the binding mode. An inactive binding that is completed has an expired schedule, and cannot become active again. For inactive bindings that are not completed, the dump shows the workshift that will next be active and when it will be active. This dump shows all completed bindings.

ess.processor

Dumps current processor information for this instance.

Dumps the processor state and active thread count, plus a list of enabled and deployed applications. The active thread count is the number of threads that are in use across all resources, including deactivated resources. For detailed information on work allocation, see dump ess.workalloc.

If an application is not processing requests, make sure the processor is running and the application is both deployed and enabled on the server.

ess.requests

Dumps detailed information about all requests in the process group that are in a non-terminal state. Includes core and extended system properties and CP parameters.

ess.servers

Dumps server information, such as last check-in, for all active servers in the isolation group. Every server must check in at some interval (one minute by default).

If a server hasn't checked in for over one minute, it may have a problem. After a server hasn't checked in for some period of time, Oracle Enterprise Scheduler may assume the server is down and fail over the requests that were being processed on that server.

ess.workalloc

Dumps detailed information on work assignments, including maximum resources and current allocations. The whereClause shows the effective specialization for the work assignment, which accounts for work assignments bound in exclusive mode.

This dump may not show all completed bindings. Use ess.bindings to check if a binding is complete.

If there are no bindings, this dump shows information on the default work assignment.

ess.workunits

Dumps all work units for this process group.

3.5.1 The Dump Commands

The following example shows how to start WLST and connect to the server:

$MW_HOME/oracle_common/common/bin/wlst.sh
...
Initializing WebLogic Scripting Tool (WLST) ...
 
Welcome to WebLogic Server Administration Scripting Shell
 
Type help() for help on available commands
 
wls:/offline> connect('weblogic','welcome1','localhost:7001')
Connecting to t3://localhost:7001 with userid weblogic ...
Successfully connected to Admin Server 'AdminServer' that belongs to domain 'base_domain'.
 
Warning: An insecure protocol was used to connect to the
server. To ensure on-the-wire security, the SSL port or
Admin port should be used instead.
 
wls:/base_domain/serverConfig>

Note:

You can connect to the admin server or a managed server. However, if you connect to the admin server, you must specify the managed server to use with each dump command, for example:

executeDump(name="ess.applications", appName="ESSAPP",server='ess_server1')

Once WLST is started and connected to the server, you can use the executeDump, listDumps, describeDump commands as shown in the following sections.

3.5.1.1 executeDump

The executeDump command creates a diagnostic dump based on the dump name and the application name.

3.5.1.1.1 Syntax

executeDump(name="dump_name",appName="app_name", [server="server_name"])

Argument Definition

name

The dump name from Table 3-3.

appName

The name of the application.

server

Optional. You can connect to the AdminServer or a managed server. If you connect to the AdminServer, you must use the server argument to specify the name of the managed server to use with each dump command.

3.5.1.2 listDumps

The listDumps command lists the available dumps for a given application.

3.5.1.2.1 Syntax

listDumps(appName="app_name")

Argument Definition

appName

The name of the application.

3.5.1.3 describeDump

Lists help for a specific dump type.

3.5.1.3.1 Syntax

describeDump(name="dump_name")

Argument Definition

name

The dump name from Table 3-3.

3.5.2 Dump Examples

The following examples show how to use the diagnostic dumps listed in Table 3-3.

  • Dump all registered applications on every server in the isolation group. An application that is registered on more than one server appears multiple times in this dump. For an application on a given server, you can check what version is registered, whether the application is active, and when it was last activated.

    executeDump(name="ess.applications",appName="ESSAPP")

  • Dump processor bindings for this instance, including the binding mode. An inactive binding that is completed has an expired schedule, and it does not become active again. For inactive bindings that are not completed, the dump shows the workshift that will be active next and when it will be active. This dump shows all completed bindings.

    executeDump(name="ess.bindings",appName="ESSAPP")

  • Dump processor state and active thread count, plus list enabled and deployed applications. The active thread count is the number of threads that are in use across all resources, including deactivated resources. For more information about work allocation, see the entry for ess.workalloc in Table 3-3.

    If an application is not processing requests, make sure the processor is running and the application is both deployed and enabled on the server.

    executeDump(name="ess.processor",appName="ESSAPP")

  • Dump detailed information about all requests in the process group that are in a non-terminal state. Includes core and extended system properties and CP parameters.

    executeDump(name="ess.requests",appName="ESSAPP")

  • Dump all active servers in the isolation group. Every server must check in at an interval, one minute by default. If a server does not check in for over one minute, it may have a problem. If a server does not check in for some period of time, ESS may assume the server is down and fail over the requests that were being processed on that server.

    executeDump(name="ess.servers",appName="ESSAPP")

  • Dump detailed information about work assignments, including maximum resources and current allocations. The whereClause information shows the effective specialization for the work assignment, which accounts for work assignments bound in exclusive mode.

    This dump may not show all completed bindings. To check whether a binding is complete, use the ess.bindings dump. If there are no bindings, this dump shows information about the default work assignment.

    executeDump(name="ess.workalloc",appName="ESSAPP")

  • Dump all work units in the process group.

    executeDump(name="ess.workunits",appName="ESSAPP")

3.5.3 Creating an Oracle Enterprise Scheduler Incident

Oracle Enterprise Scheduler provides a convenient way to create an incident with all Oracle Enterprise Scheduler diagnostic dumps, using the message id ESS-99999. For example:

createIncident(messageId="ESS-99999",appName="ESSAPP", description="ESS incident with all dumps")

The incident files are located in the ADRHome directory, and you can use the listADRHOmes() command to list them.

Note that Oracle Enterprise Scheduler uses the following paths:

ADRBase = ${MW_HOME}/user_projects/domains/base_domain/servers/SERVER/adr

ADRHome = ${ADRBase}/diag/ofm/base_domain/SERVER

3.6 Oracle Enterprise Scheduler Convenience Scripts

To simplify execution, wrapper shell scripts (.sh on Linux/Unix and .cmd on Windows) are provided to invoke the native WLST commands. The scripts set environment properties such as CLASSPATH before using wlst.sh to invoke the WLST native commands. All the scripts are available in the $ORACLE_HOME/bin directory.

The .sh and.cmd commands connect to a WLS server before executing the corresponding WLST command. By default, the server connection details are read from a file named server.properties in the HOME directory of the user running the command (typically /home/UserId on Linux/Unix and C:\Documents and Settings\UserId on Windows). You can override the default file by specifying an alternate file or by providing explicit values (host, port, user name, password) on the command line. The host, port, user name and password values specified on the command line take precedence over the corresponding values in the files.

The connection details must be specified in the following syntax in the server.properties file or in any alternate file provided on the command line:

ADMIN_SERVER_HOST=host.example.com
ADMIN_SERVER_PORT=7001
ADMIN_USER_NAME=weblogic
ADMIN_PASSWORD=weblogic1
ESS_SERVER_NAME=ess_server1

In order to comply with manageability checklist requirements, the password cannot be supplied as a command-line argument while invoking shell scripts. It can either be part of the server.properties file or entered interactively. You can use one of the following methods to automate interactive password submission:

  • Write the WLS administrator password in a file, and then use it to redirect input to command. For example:

    sh essManageRuntimeConfig.sh .... < input.txt

  • After the command finishes use "<<EOF". EOF can be any unique string other than the actual password. In the next line write the password, followed by EOF in the next line (or whatever terminating string you used after <<). For Example:

    sh essManageRuntimeConfig.sh ... <<EOF
    wls_admin_password
    EOF

3.6.1 essManageRuntimeConfig

Manages Oracle Enterprise Scheduler runtime configuration parameters. The server connection parameters are specified using a file as described in Oracle Enterprise Scheduler Convenience Scripts. However, the default values can be overridden by explicitly specifying them on the command line or specifying an alternate file using the -f option. The admin server password for WLS has to be provided either in a file or entered interactively.

3.6.1.1 Syntax

essManageRuntimeConfig.sh [-a | -m | -d] -A appname -t parameter_type [-n name] [-v value] [-f filename] [-H hostname] [-P port] [-u user] [-s server_name] [-h]

3.6.1.2 Options

The following table lists and describes the command options.

Option Description

-a, --add

Adds a configuration parameter

-m, --mod

Modifies a configuration parameter

-d, --del

Deletes a configuration parameter.

-A, --app appname

Specifies the name of the hosting application.

-t, --type parameter_type

Specifies the type of the configuration parameter. Possible types are:

  • ESS - for Oracle Enterprise Scheduler parameters

  • APP - for user defined parameters

-n, --name name

Specifies the name of the configuration parameter.

-v, --val value

Specifies the value of the configuration parameter.

-f, --file filename

Specifies the name of the file that contains the server connection parameters. If not specified, the default file $HOME/server.properties is used.

-H, --host hostname

Specifies the hostname or IP address of the WLS server.

-P, --port port

Specifies the port number to connect.

-u, --user username

Specifies the user name.

-s, --serv server_name

Specifies the name of the server on which ESSAPP is running.

-h

Displays the command usage.

3.6.1.3 Associated Files

The following file is used with this command:

server.properties: Contains server connection information

3.6.1.4 Exit Values

The command exits with the following possible values:

  • 0: Success

  • -1: Error

3.6.1.5 Examples
  • Add a user-defined parameter foo with value bar for the application myapp:

    essManageRuntimeConfig.sh -a -A myapp -t APP -n foo -v bar
    
  • Get the value of user-defined parameter foo for the application myapp:

    essManageRuntimeConfig.sh -A myapp -t APP -n foo
    
  • Get the list of all user-defined parameters for the application myapp:

    essManageRuntimeConfig.sh -A myapp -t APP
    
  • Modify the value of the user-defined parameter foo to barone for the application myapp:

    essManageRuntimeConfig.sh -m -A myapp -t APP -n foo -v barone
    
  • Delete the user-defined parameter foo for application myapp:

    essManageRuntimeConfig.sh -d -t APP -A myapp -n foo
    
  • Show all ESS parameters for myapp:

    essManageRuntimeConfig.sh -t ESS -A myapp

3.6.2 essGetOutputContent

Retrieves the request log and output data files from the content store for all the specified request IDs. The server connection parameters are specified using a file as described in Oracle Enterprise Scheduler Convenience Scripts. However, the default values can be overridden by explicitly specifying them on the command line or specifying an alternate file using the -f option. The admin server password for WLS has to be provided in a file or entered interactively.

3.6.2.1 Syntax

essGetOutputContent.sh [-t content_type] [-d dir] [-n lines] [-x disp] [-f filename] [-H hostname] [-P port] [-u user] [-s server_name] [-h] requestId1 ...

3.6.2.2 Options

The following table lists and describes the command options.

Option Description

-t, --content type

Specifies one of the following types of content to get:

  • LOG

  • OUTPUT

  • TEXT_OUTPUT

  • BINARY_OUTPUT

If this option is not specified, both log and output content are retrieved.

-d, --outDir dir

Specifies the directory where content is stored. The default is the current directory.

-n, --logLines lines

Specifies the number of lines of log to retrieve. The default is 1000.

-x, --logDisplay disp

Specifies where log lines are presented. The valid values are CONSOLE or FILE. The default is FILE.

-f, --file filename

Specifies the name of the file that contains the server connection parameters. If not specified, the default file $HOME/server.properties is used.

-H, --host hostname

Specifies the hostname or IP address of the WLS server.

-P, --port port

Specifies the port number to connect.

-u, --user username

Specifies the user name.

-s, --serv server_name

Specifies the name of the server on which ESSAPP is running.

-h

Displays the command usage.

3.6.2.3 Associated Files

The following file is used with this command:

server.properties: Contains server connection information

3.6.2.4 Exit Values

The command exits with the following possible values:

  • 0: Success

  • -1: Error

3.6.2.5 Examples
  • Get the request log for request ID 123:

    essGetOutputContent.sh -t LOG 123
    
  • Get all of the output from request 123:

    essGetOutputContent.sh -t OUTPUT 123
    
  • Get all the output of request 123 and save it in directory /tmp:

    essGetOutputContent.sh -t OUTPUT -d "/tmp" 123
    
  • Get the first 100 lines of the request log for request ID 123:

    essGetOutputContent.sh -t LOG -n 100 123
    
  • Get the request log and output data for requests 123 and 124 and save it in /tmp:

    essGetOutputContent.sh -d "/tmp" 123 124
3.6.2.6 Related Native Command

3.6.3 essQueryRequests

Search and list requests based upon hosting application name, state or elapsed time of execution. This command can be used to find long running requests. The server connection parameters are specified using a file as described in Oracle Enterprise Scheduler Convenience Scripts. However, the default values can be overridden by explicitly specifying them on the command line or specifying an alternate file using the -f option. The admin server password for WLS has to be provided in a file or entered interactively.

3.6.3.1 Syntax

essQueryRequests.sh [-a app_name] [-S state] [-d days] [-n hours] [-m minutes] [-f filename] [-H hostname] [-P port] [-u user] [-s server_name] [-h]

3.6.3.2 Options

The following table lists and describes the command options.

Option Description

-a, --appName app_name

Specifies the hosting application name.

-S, --state state

Specifies one of the following request states:

  • WAIT

  • READY

  • RUNNING

  • COMPLETED

  • BLOCKED

  • HOLD

  • CANCELLING

  • EXPIRED

  • CANCELLED

  • ERROR

  • WARNING

  • SUCCEEDED

  • PAUSED

  • PENDING_VALIDATION

  • VALIDATION_FAILED

  • SCHEDULE_ENDED

  • FINISHED

  • ERROR_AUTO_RETRY

  • ERROR_MANUAL_RECOVERY

-d, --days days

Specifies the running time in days.

-n, --hours hours

Specifies the running time in hours.

-m, --minutes minutes

Specifies the running time in minutes.

-f, --file filename

Specifies the name of the file that contains the server connection parameters. If not specified, the default file $HOME/server.properties is used.

-H, --host hostname

Specifies the hostname or IP address of the WLS server.

-P, --port port

Specifies the port number to connect.

-u, --user username

Specifies the user name.

-s, --serv server_name

Specifies the name of the server on which ESSAPP is running.

-h

Displays the command usage.

3.6.3.3 Associated Files

The following file is used with this command:

server.properties: Contains server connection information

3.6.3.4 Exit Values

The command exits with the following possible values:

  • 0: Success

  • -1: Error

3.6.3.5 Examples
  • Get all running requests:

    essQueryRequests.sh -S RUNNING
    
  • Get all cancelled requests:

    eessQueryRequests.sh -S CANCELLED
    
  • Get all requests running for more than two days:

    essQueryRequests.sh -d 2
    
  • Get all requests running for more than 10 hours:

    essQueryRequests.sh -n 10
    
  • Get all requests running for the application myapp:

    essQueryRequests.sh -a myapp
    
  • Get all requests in the CANCELLING state for the application myapp:

    essQueryRequests.sh -a myapp -S CANCELLING
    
  • Get all requests that have been running for more than 2.5 days for the application myapp:

    essQueryRequests.sh -a myapp -d 2 -n 12
    
3.6.3.6 Related Native Command

3.6.4 essManageRequests

Cancel, recover, or complete one or more requests given their request IDs. The server connection parameters are specified using a file as described in Oracle Enterprise Scheduler Convenience Scripts. However, the default values can be overridden by explicitly specifying them on the command line or specifying an alternate file using the -f option. The admin server password for WLS has to be provided in a file or entered interactively.

3.6.4.1 Syntax

essManageRequests.sh [-c] [-r] [-C] [-g] [-S status] [-M message] [-f filename] [-H hostname] [-P port] [-u user] [-s server_name] [-h] requestId1 ...

3.6.4.2 Options

The following table lists and describes the command options.

Option Description

-c, --cancel

Cancels request.

-r, --recover

Recovers a request

-C, --complete

Marks a request as completed.

-g, --getdetail

Gets a request's details.

-S, --asyncStatus status

When marking request as complete, specifies one of the following final disposition statuses:

  • SUCCESS

  • PAUSE

  • WARNING

  • ERROR

  • CANCEL

  • UPDATE

  • BIZ_ERROR

  • ERROR_MANUAL_RECOVERY

-M, --statusMessage message

Specifies a qualifying message that describes the operation when marking request as complete.

-f, --file filename

Specifies the name of the file that contains the server connection parameters. If not specified, the default file $HOME/server.properties is used.

-H, --host hostname

Specifies the hostname or IP address of the WLS server.

-P, --port port

Specifies the port number to connect.

-u, --user username

Specifies the user name.

-s, --serv server_name

Specifies the name of the server on which ESSAPP is running.

-h

Displays the command usage.

3.6.4.3 Associated Files

The following file is used with this command:

server.properties: Contains server connection information

3.6.4.4 Exit Values

The command exits with the following possible values:

  • 0: Success

  • -1: Error

3.6.4.5 Examples
  • Cancel requests 123 and 124:

    essManageRequests.sh -c 123 124
    
  • Recover request 123:

    essManageRequests.sh -r 123
    
  • Complete request 123:

    essManageRequests.sh -C -S ERROR -M "Completed by Admin" 123
    
3.6.4.6 Related Native Command

3.6.5 essManageServer

Start, stop or get the status of the Oracle Enterprise Scheduler application running on the server. Starting the Oracle Enterprise Scheduler application means to start the Oracle Enterprise Scheduler processor thread so that request processing can start. Stopping Oracle Enterprise Scheduler means to stop or quiesce the Oracle Enterprise Scheduler processor so that no new requests are processed. The server connection parameters are specified using a file as described in Oracle Enterprise Scheduler Convenience Scripts. However, the default values can be overridden by explicitly specifying them on the command line or specifying an alternate file using the -f option. The admin server password for WLS has to be provided in a file or entered interactively.

3.6.5.1 Syntax

essManageServer.sh [-start] [stop] [-status] [-f filename] [-H hostname] [-P port] [-u user] [-s server_name] [-h]

3.6.5.2 Options

The following table lists and describes the command options.

Option Description

-n, --start

Starts the Oracle Enterprise Scheduler processor thread.

-x, --stop

Stops the Oracle Enterprise Scheduler processor thread.

-S, --status

Displays the current status of the Oracle Enterprise Scheduler processor thread.

-f, --file filename

Specifies the name of the file that contains the server connection parameters. If not specified, the default file $HOME/server.properties is used.

-H, --host hostname

Specifies the hostname or IP address of the WLS server.

-P, --port port

Specifies the port number to connect.

-u, --user username

Specifies the user name.

-s, --serv server_name

Specifies the name of the server on which ESSAPP is running.

-h

Displays the command usage.

3.6.5.3 Associated Files

The following file is used with this command:

server.properties: Contains server connection information

3.6.5.4 Exit Values

The command exits with the following possible values:

  • 0: Success

  • -1: Error

3.6.5.5 Examples
  • Stop Oracle Enterprise Scheduler processor:

    essManageServer.sh --stop
    
  • Get the current state of the Oracle Enterprise Scheduler processor:

    essManageServer.sh --status
    
3.6.5.6 Related Native Command

3.6.6 essSubmitRequest

Submit a job request to ESSAPP for execution. It is assumed that the job definition exists in the MDS. The user can specify the job execution schedule in the following four ways:

  • Immediate: The job is scheduled for immediate one-time execution.

  • Once: The job is scheduled to run once at a fixed time specified by the user.

  • Schedule: The name of a predefined schedule (in MDS) is provided and the job runs on that schedule.

  • Recurring: The schedule can be created in an ad-hoc manner by providing relevant arguments through this command. This schedule is used for the request submission and it is stored in the MDS for future use. The storage location is based on the schedule name provided.

If no scheduling method is specified, immediate execution is used.

Note:

The job definition must be predefined, while the schedule may be defined in an ad-hoc manner using this command.

The jobName and schName options must be fully qualified names that includes the package name. If they are not fully qualified, the following package is used: /oracle/apps/ess/custom/.

The server connection parameters are specified using a file as described in Oracle Enterprise Scheduler Convenience Scripts. However, the default values can be overridden by explicitly specifying them on the command line or specifying an alternate file using the -f option. The admin server password for WLS has to be provided in a file or entered interactively.

3.6.6.1 Syntax

essSubmitRequest.sh appName jobName [-n reqNote] [-I | -O time | -R params | -S schName] [-f filename] [-H hostname] [-P port] [-u user] [-s server_name] [-h] [prop=value ...]

3.6.6.2 Options

The following table lists and describes the command options.

Option Description

appName

Names the job's hosting application.

jobName

Names the job definition to be used for the current request.

-n, --note reqNote

Specifies a short description for the job request

-S, --schName schName

Names the predefined schedule definition.

-A, --RschName name

Names the schedule if you define the schedule using -R option.

-C, --schDesc desc

Specifies a description of the ad-hoc schedule being defined. The default value is "Custom Ad-Hoc Schedule".

-I, --immediate

Specifies that the job should be executed immediately. This is used as the default if no other schedule is specified.

-O, --o_time time

Specifies the time for one time execution. Format: HH:MM:SS:DD:MM:YYYY.

-R, --recurring

Specifies that the schedule recurs.

-b, --begin_time time

Specifies the start time for a recurring schedule. Format: HH:MM:SS:DD:MM:YYYY .

-F, --frequency value

Specifies the frequency of recurrence. Valid values: [SECOND,MINUTE,HOUR,DAY,WEEK,MONTH,YEAR]

-N, --freqNum num

Specifies an integer value that represents the frequency repeat interval.

-c, --count num

Specifies an integer value that is the maximum number of repetitions.

-e, --end_time time

Specifies the recurrence end time. Format: HH:MM:SS:DD:MM:YYYY.

-m, --month month

Defines the month of the year if the frequency is YEAR. Valid values are: [1-12].

-w, --week week

Specifies the week of a month. Valid values are: [1-6, LAST].

-d, --day day

Specifies the day of a week. Valid values are: [1-7], where 1 represents Monday.

-D, --date date

Specifies a specific day of month. Valid values are: [1-31, LAST].

prop=value

Specifies other request parameters/properties specified as: prop1=val1 prop2=val2 and so on. These values should be added as the last options in the command.

-f, --file filename

Specifies the name of the file that contains the server connection parameters. If not specified, the default file $HOME/server.properties is used.

-H, --host hostname

Specifies the hostname or IP address of the WLS server.

-P, --port port

Specifies the port number to connect.

-u, --user username

Specifies the user name.

-s, --serv server_name

Specifies the name of the server on which ESSAPP is running.

-h

Displays the command usage.

3.6.6.3 Associated Files

The following file is used with this command:

server.properties: Contains server connection information

3.6.6.4 Exit Values

The command exits with the following possible values:

  • 0: Success

  • -1: Error

3.6.6.5 Examples

The following values apply to all of the examples:

HOSTING_APP = EssDemoApp

SCHEDULE_NAME= /oracle/apps/ess/custom/MySch

JOB_DEF_NAME= /oracle/apps/ess/demopackage/BasicJavaJob

and server connection properties are defined in the ~/server.properties file.

Note:

The [prop-value ...] values should be added as the last options in the command.

  • Submit a request for immediate job execution (one-time only).:

    essSubmitRequest.sh HOSTING_APP JOB_DEF_NAME
    
  • Submit a request for one-time job execution at a specified time.:

    essSubmitRequest.sh HOSTING_APP JOB_DEF_NAME -O 21:10:30:03:05:2012
    
  • Submit a job request with a recurring schedule. The recurrence is defined as follows:

    • Execution recurs every 2 minutes

    • Starts at 21:10:30 on 03 May 2012

    • Completes three iterations

    • Additional request parameters are: eqName=test and PRIORITY=10. This recurrence will persisted in the MDS repository for future use.

    essSubmitRequest.sh HOSTING_APP JOB_DEF_NAME -R -A SCHEDULE_NAME -F MINUTE -N 2 -c 3 -b 21:10:30:03:05:2012 reqName=test PRIORITY=10
    
  • Submit a job request using a predefined schedule:

    essSubmitRequest.sh HOSTING_APP JOB_DEF_NAME -S SCHEDULE_NAME 
    
  • Submit a job request with a monthly recurring schedule. The description for the request is "Request with monthly schedule". The recurring schedule name and description are provided by -A and -C options. The recurrence is: Execution recurs every 2 months, on Thursday of the 5th week (if applicable), starting at 21:10:30 on 03 May 2012, until 21:10:30 on 04 May 2013:

    essSubmitRequest.sh HOSTING_APP JOB_DEF_NAME -n "Request with monthly schedule" -R -A SCHEDULE_NAME -C Monthly_schedule -F MONTH -N 2 -b 21:10:30:03:05:2012 -w 5 -d 4 -e 21:10:30:04:05:2013
    
  • Submit a job request with a yearly recurring schedule. The description for the request is "Request with yearly schedule". The recurring schedule name and description are provided by the -A and -C options. The recurrence is: Execution will recur every 3 years, on the last day of May, starting at 21:10:30 on 03 May 2012, for 5 iterations:

    essSubmitRequest.sh HOSTING_APP JOB_DEF_NAME -n "Request with yearly schedule" -R -A SCHEDULE_NAME-C "Yearly_schedule" -F YEAR -N 3 -b 21:10:30:03:05:2012 -m 5 -D LAST -c 5
    
  • Submit a job request with an hourly recurring schedule. Recurrence is: Execution repeats every hour starting at the current time.:

    essQueryRequests.sh -a myapp -d 2 -n 12
    

3.6.7 essManageJobDefn

Manage (show, create, delete, customize, update) an Oracle Enterprise Scheduler job definition.

The show option (-S) displays the list of job definitions that are part of a particular application. If a job name is specified it only shows the details of this job definition.The create option (-N) creates a new job definition in the namespace of the relevant application (supplied as a parameter) in MDS.The delete option (-D) deletes a job definition from the MDS.The customize option (-C) modifies the customizable properties of an existing job definition.The update option (-U) updates an existing job definition with the desired property values (existing parameters persist if not overridden).

Note:

  • For job definition creation, deletion and update, the default package path /oracle/apps/ess/custom/ is always prepended to the specified job name.

  • You can only create, delete, or update the job definitions present in the /oracle/apps/ess/custom namespace. That means that prepackaged job definitions cannot be modified.

  • You cannot customize job definitions present in the customer namespace /oracle/apps/ess/custom. Use the update option to modify those definitions.

  • For the jobType specification, if you do not specify a fully qualified name, the default package /oracle/as/ess/core/ is prepended to the name.

The server connection parameters are specified using a file as described in Oracle Enterprise Scheduler Convenience Scripts. However, the default values can be overridden by explicitly specifying them on the command line or specifying an alternate file using the -f option. The admin server password for WLS has to be provided in a file or entered interactively.

3.6.7.1 Syntax

essManageJobDefn.sh appName [-j jobName] [-t jobType] [-d desc] -S | -N | -D | -C | -U [-f filename] [-H hostname] [-P port] [-u user] [-s server_name] [-h] [prop=value ...]

3.6.7.2 Options

The following table lists and describes the command options.

Option Description

appName

Specifies the logical name of the hosting application for a job.

-j, --jobName jobDefn

Specifies the name of the job definition. For the create, delete, and update operations, the default package /oracle/apps/ess/custom/ is prepended to the specified name.

-t, --jobType jobType

Specifies the name of the predefined job type to be used for creating the job definition. If the name does not contain package path, the following path is prepended to it: /oracle/as/ess/core/.

-d, --desc description

Specifies a description of the job definition

-S, --show

Displays the list of job definitions that are part of a particular application. If a job name is specified it shows the details of only that job definition. Used with appName and -j.

-N, --create

Creates a new job definition. Used with appName, -j, -t, -d and prop=value.

-D, --delete

Deletes an existing job definition. Used with appName and -j.

-C, --customize

Modifies customizable properties of the job definition. Properties can be:

  • SYS_retries

  • SYS_priority

  • SYS_requestCategory

  • SYS_request_timeout

  • enableTrace

  • enableTimeStatistics

Used with appName, -j option, prop=value.

-U, --update

Updates an existing job definition. This option replaces the current definition with a new one in which existing parameters persist if not overridden. Used with appName, -j and either -d or prop=value.

prop=value

Specifies other request parameters/properties specified as: prop1=val1 prop2=val2 and so on.

-f, --file filename

Specifies the name of the file that contains the server connection parameters. If not specified, the default file $HOME/server.properties is used.

-H, --host hostname

Specifies the hostname or IP address of the WLS server.

-P, --port port

Specifies the port number to connect.

-u, --user username

Specifies the user name.

-s, --serv server_name

Specifies the name of the server on which ESSAPP is running.

-h

Displays the command usage.

3.6.7.3 Associated Files

The following file is used with this command:

server.properties: Contains server connection information

3.6.7.4 Exit Values

The command exits with the following possible values:

  • 0: Success

  • -1: Error

3.6.7.5 Examples

The following values apply to all of the examples:

HOSTING_APP = ESS_NATIVE_HOSTING_APP_LOGICAL_NAME

JOB_DEF_PREDEF= /oracle/apps/ess/TestJob

JOB_DEF_NAME = TestJob_wlst

JOB_TYPE_NAME = JavaJobType

JOB_DESC = My WLST Test Defn

and server connection properties are defined in the ~/server.properties file.

  • Show all job definitions present in namespace of HOSTING_APP:

    essManageJobDefn.sh HOSTING_APP -S
    
  • Show details of the job definition JOB_DEF_PREDEF part of HOSTING_APP:

    essManageJobDefn.sh HOSTING_APP -S -j JOB_DEF_PREDEF
    
  • Create a new job definition named /oracle/apps/ess/custom/TestJob_wlst in the namespace of HOSTING_APP with the job type /oracle/as/ess/core/JavaJobType:

    essManageJobDefn.sh HOSTING_APP -N -j JOB_DEF_NAME -t JOB_TYPE_NAME
    
  • Create a new job definition named /oracle/apps/ess/custom/TestJob_wlst in namespace of HOSTING_APP with the job type /oracle/as/ess/core/JavaJobType and with the description JOB_DESC:

    essManageJobDefn.sh HOSTING_APP -N -j JOB_DEF_NAME -t JOB_TYPE_NAME -d JOB_DESC 
    
  • Create a new job definition named /oracle/apps/ess/custom/TestJob_wlst in the namespace of HOSTING_APP with the job type /oracle/as/ess/core/JavaJobType and with the description JOB_DESC and the properties SYS_retries and myParam:

    essManageJobDefn.sh HOSTING_APP -N -j JOB_DEF_NAME -t JOB_TYPE_NAME -d JOB_DESC SYS_retries=1 myParam=xyz
    
  • Update the job definition /oracle/apps/ess/custom+JOB_DEF_NAME with the new description JOB_DESC:

    essManageJobDefn.sh HOSTING_APP -U -j JOB_DEF_NAME -d JOB_DESC
    
  • Update the job definition /oracle/apps/ess/custom+JOB_DEF_NAME with the properties SYS_retries and myParam:

    essManageJobDefn.sh HOSTING_APP -U -j JOB_DEF_NAME SYS_retries=1 myParam=xyz
    
  • Delete the job definition /oracle/apps/ess/custom+JOB_DEF_NAME in HOSTING_APP:

    essManageJobDefn.sh HOSTING_APP -D -j JOB_DEF_NAME
    
  • Customize the prepackaged job definition JOB_DEF_PREDEF in HOSTING_APP with the customizable properties SYS_retries & SYS_priority.:

    essManageJobDefn.sh HOSTING_APP -C -j JOB_DEF_PREDEF SYS_retries=2 SYS_priority=3
    

3.6.8 essManageSchedule

Manage (show, create, delete, customize and update) an Oracle Enterprise Scheduler schedule definition.

The show option (-S) displays the list of schedule definitions that are part of a particular application. If a schedule name is specified, it one shows the details for that schedule definition.

The create option (-C) creates a new schedule definition in the namespace of the relevant application (supplied as a parameter) in the MDS.

The delete option (-D) deletes the specified schedule definition from the MDS.

The update option (-U) updates an existing schedule definition with the specified property values (existing parameters persist if not overridden).

The server connection parameters are specified using a file as described in Oracle Enterprise Scheduler Convenience Scripts. However, the default values can be overridden by explicitly specifying them on the command line or specifying an alternate file using the -f option. The admin server password for WLS has to be provided in a file or entered interactively.

Note:

The default package name: /oracle/apps/ess/custom/ is always prepended to the schedule name specified with the -n option.

3.6.8.1 Syntax

essManageSchedule.sh appName [-n schName] [-d desc] -S | -C | -D | -U -F value [-I interval] [-b begin_time] [-c count | -e end_time][-f filename] [-H hostname] [-P port] [-u user] [-s server_name]

3.6.8.2 Options

The following table lists and describes the command options.

Option Description

appName

Specifies the logical name of the hosting application.

-n, --schName schName

Specifies the name of the schedule definition. For the create, delete, and update operations, the default package /oracle/apps/ess/custom/ is prepended to the specified name.

-d, --schDesc description

Specifies a description of the schedule definition

-S, --show

Displays the list of schedule definitions that are part of a particular application. If a schedule name is specified it shows the details of only that schedule definition. Used with appName, -n and -d.

-C, --create

Creates a new schedule definition. Used with appName, -j, -t, -d and prop=value.

-D, --delete

Deletes an existing schedule definition. Used with appName and -n.

-U, --update

Updates an existing schedule definition. This option replaces the current definition with a new one in which existing parameters persist if not overridden. Used with appName, -n and either -d or -F.

-b, --begin_time time

Specifies the recurrence start time. Format: HH:MM:SS:DD:MM:YYYY

-F, --frequency value

Specifies the frequency of recurrence. Valid values: SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, YEAR

Possible options:

-F value [-I interval] [-b begin_time] [-c count | -e end_time] (if value is SECOND, MINUTE, HOUR, DAY, WEEK otherwise, one of the following)

-F MONTH [{-w week -d day} | {-D date}] [-b begin_time] [-c count | -e end_time]

-F YEAR [-m month ({-w week -d day} | {-D date})] [-b begin_time] [-c count | -e end_time]

-I, --interval num

Specifies an integer value that is used as the repeat interval for the -F option.

-c, --count num

Specifies an integer value that is the maximum number of repetitions.

-e, --end_time time

Specifies the recurrence end time. Format: HH:MM:SS:DD:MM:YYYY.

-m, --month month

Defines the month of the year if the frequency is YEAR. Valid values are: [1-12].

-f, --file filename

Specifies the name of the file that contains the server connection parameters. If not specified, the default file $HOME/server.properties is used.

-H, --host hostname

Specifies the hostname or IP address of the WLS server.

-P, --port port

Specifies the port number to connect.

-u, --user username

Specifies the user name.

-s, --serv server_name

Specifies the name of the server on which ESSAPP is running.

-h

Displays the command usage.

3.6.8.3 Associated Files

The following file is used with this command:

server.properties: Contains server connection information

3.6.8.4 Exit Values

The command exits with the following possible values:

  • 0: Success

  • -1: Error

3.6.8.5 Examples

The following values apply to all of the examples:

HOSTING_APP = ESS_NATIVE_HOSTING_APP_LOGICAL_NAME

PREDEF_SCHEDULE = /oracle/apps/ess/demo/seeded/MyPredefinedSch

SCHEDULE_NAME = MyWlstSchedule

SCH_DESC = Description for WLST test schedule

and server connection properties are defined in the ~/server.properties file.

  • Show all schedule definitions present in namespace of HOSTING_APP:

    essManageSchedule.sh HOSTING_APP -S
    
  • Show details of the schedule definition PREDEF_SCHEDULE of HOSTING_APP:

    essManageSchedule.sh HOSTING_APP -S -n PREDEF_SCHEDULE
    
  • Create a new recurring schedule definition named /oracle/apps/ess/custom/MyWlstSchedule in the namespace of HOSTING_APP with the description SCH_DESC. The recurrence is: Occur every 2 minutes, starting at 21:10:30 on 03 May 2012, for 3 iterations:

    essManageSchedule.sh HOSTING_APP -C -n SCHEDULE_NAME -d SCH_DESC -F MINUTE -I 2 -c 3 -b 21:10:30:03:05:12
    
  • Create a new recurring schedule definition named /oracle/apps/ess/custom/MyWlstSchedule in the namespace of HOSTING_APP. The recurrence is: Occur every 2 months, on Thursday of the 5th week (if applicable), starting at 21:10:30 on 03 May 2012, and running until 21:10:30 on 04 May 2013:

    essManageSchedule.sh HOSTING_APP -C -n SCHEDULE_NAME -F MONTH -I 2 -b 21:10:30:03:05:12 -w 5 -x 4 -e 21:10:30:04:05:13 
    
  • Create a new recurring schedule definition named /oracle/apps/ess/custom/MyWlstSchedule in the namespace of HOSTING_APP. The recurrence is: Occur every 3 years, on the last day of May, starting at 21:10:30 on 03 May 2012, for 5 iterations:

    essManageSchedule.sh HOSTING_APP -C -n SCHEDULE_NAME -F YEAR -I 3 -b 21:10:30:03:05:12 -m 5 -y LAST -c 5
    
  • Create a new recurring schedule definition named /oracle/apps/ess/custom/MyWlstSchedule in the namespace of HOSTING_APP. The recurrence is: Occur every hour, starting from the current time:

    essManageSchedule.sh HOSTING_APP -C -n SCHEDULE_NAME -F HOUR
    
  • Update the schedule definition /oracle/apps/ess/custom+SCHEDULE_NAME with the new description SCH_DESC. Recurrence remains unchanged:

    essManageSchedule.sh HOSTING_APP -U -n SCHEDULE_NAME -d SCH_DESC
    
  • Update the schedule definition /oracle/apps/ess/custom+SCHEDULE_NAME with the following new recurrence - occur every minute:

    essManageSchedule.sh HOSTING_APP -U -n SCHEDULE_NAME -F MINUTE
    
  • Delete the schedule definition /oracle/apps/ess/custom+SCHEDULE_NAME in HOSTING_APP:

    essManageSchedule.sh HOSTING_APP -D -n SCHEDULE_NAME
    

3.6.9 essBatchDeleteRequests

Submits a request for a batch delete job. User can either use a pre-defined schedule (in MDS) or specify a one-time execution time. If neither of these is specified, the request starts immediately.

The request parameters are used to specify the delete criteria. When the batch delete job runs, it determines which completed absolute parent and instance parent requests satisfy the delete criteria specified for that batch job request and deletes the request hierarchy for those requests.

For detailed list and description of valid batch delete parameters, see Batch Delete Parameters.

The server connection parameters are specified using a file as described in Oracle Enterprise Scheduler Convenience Scripts. However, the default values can be overridden by explicitly specifying them on the command line or specifying an alternate file using the -f option. The admin server password for WLS has to be provided in a file or entered interactively.

3.6.9.1 Syntax

essBatchDeleteRequests.sh [-d desc] [-S schId] [-b beginTime] [-e endTime] [-f filename] [-H hostname] [-P port] [-u user] [-s server_name] [-h] [prop=value ...]

3.6.9.2 Options

The following table lists and describes the command options.

Option Description

-d, --desc desc

Specifies a description for the batch delete request.

-S, --schId schId

Specifies the fully qualified name of the schedule to use. The default package (used if the package is not specified) is /oracle/as/ess/essapp/custom/.

-b, --begin beginTime

Specifies the time at which the request is to be started. Format: HH:MM:SS:DD:MM:YYYY

-e, --end endTime

Specifies the time past which the request should not run. Format: HH:MM:SS:DD:MM:YYYY .

prop=value

Specifies other request parameters/properties specified as: prop1=val1 prop2=val2 and so on. See Batch Delete Parameters for a list of the parameters.

-f, --file filename

Specifies the name of the file that contains the server connection parameters. If not specified, the default file $HOME/server.properties is used.

-H, --host hostname

Specifies the hostname or IP address of the WLS server.

-P, --port port

Specifies the port number to connect.

-u, --user username

Specifies the user name.

-s, --serv server_name

Specifies the name of the server on which ESSAPP is running.

-h

Displays the command usage.

3.6.9.3 Associated Files

The following file is used with this command:

server.properties: Contains server connection information

3.6.9.4 Exit Values

The command exits with the following possible values:

  • 0: Success

  • -1: Error

3.6.9.5 Examples

The following examples assume that server connection properties are defined in the ~/server.properties file.

  • Delete all purgeable requests.:

    essBatchDeleteRequests.sh
    
  • Delete all purgeable requests in the application ESS_NATIVE_HOSTING_APP_LOGICAL_NAME:

    essBatchDeleteRequests.sh --desc "My purge for ESS NativeApp" CriteriaApplication=ESS_NATIVE_HOSTING_APP_LOGICAL_NAME
    
  • Delete all purgeable requests in application ESS_NATIVE_HOSTING_APP_LOGICAL_NAME, for which the job definition is JobDefinition://oracle/apps/ess/custom/MyDef:

    essBatchDeleteRequests.sh --desc "My purge for ESS NativeApp" CriteriaApplication=ESS_NATIVE_HOSTING_APP_LOGICAL_NAMEsCriteriaJobDefn=JobDefinition://oracle/apps/ess/custom/MyDef
    
  • Submit batch delete job request using the schedule /oracle/as/ess/essapp/custom/WeeklySch:

    essBatchDeleteRequests.sh --desc "Purge using WeekSch" --schId /oracle/as/ess/essapp/custom/WeeklySch
    
  • Delete all purgeable requests submitted by the user weblogic:

    essBatchDeleteRequests.sh CriteriaSubmitUser=weblogic
    
  • Delete at most ten purgeable requests:

    essBatchDeleteRequests.sh CriteriaProcessLimit=10
    
  • Delete purgeable requests whose job execution type is JAVA_TYPE:

    essBatchDeleteRequests.sh CriteriaJobExecType=JAVA_TYPE
    
  • Delete purgeable requests that completed at five or more days ago:

    essBatchDeleteRequests.sh CriteriaMinimumAge=5
    
  • Delete purgeable requests, but retain requests that completed successfully in the past five days:

    essBatchDeleteRequests.sh CriteriaRetentionAgeSuccess=5
    
  • Delete purgeable requests that belong to the product named "DemoProduct":

    essBatchDeleteRequests.sh CriteriaProduct=DemoProduct
    
3.6.9.6 Related Native Command