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 WLST with Java Components and Oracle Fusion Middleware Services in 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.
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... |
---|---|---|
|
Add, modify, delete and display various configuration parameters. |
Online |
|
Get the log and output data files for a request after its execution is completed. |
Online |
|
Search and list requests based upon hosting application name, state or elapsed time of execution. |
Online |
|
Manually cancel, recover, or complete request state. |
Online |
|
Start, stop or get status of the Oracle Enterprise Scheduler application running on the server. |
Online |
|
Submit a job request to Oracle Enterprise Scheduler for execution. |
Online |
|
Manage (show, create, delete, customize, update) an Oracle Enterprise Scheduler job definition. |
Online |
|
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.2 Syntax
manageSchedulerRuntimeConfig(app,type,[operation],[name],[val])
Argument | Definition |
---|---|
app |
The hosting application name for managing run time configuration. |
|
The property type. Can be either |
operation |
Optional. The operation to perform. One of the following:
|
name |
(Optional for the |
|
(Optional for the |
3.2.1.3 Examples
-
Add an
ENV
parameterfoo
with value "bar":manageSchedulerRuntimeConfig("myapp", "APP", operation="add", name="foo", val="bar")
-
Get the value of
ENV
parameterfoo
: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
parameterfoo
to "barone":manageSchedulerRuntimeConfig("myapp", "APP", operation="mod", name="foo", val="barone")
-
Delete the
ENV
parameterfoo
:manageSchedulerRuntimeConfig("myapp", "APP", operation="del", name="foo")
-
Show all parameters of type
ESS
:manageSchedulerRuntimeConfig("myapp", "ESS")
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 |
---|---|
|
request ID |
|
Type of content to handle. Can be one of the following;
By default, the command checks for both |
|
Optional. The number of lines to be read from the request log. The default value is |
|
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.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 |
---|---|
|
Optional. The name of the hosting application |
|
Optional. Specifies the request state. Can be one of the following:
By default, the command specifies |
|
Optional. Specifies time in days |
|
Optional. Specifies time in hours |
|
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.4 Manage Requests
Command Category: Application Management Commands
Use with WLST: Online
3.2.4.2 Syntax
manageSchedulerRequest(requestId,operation,[asyncStatus], [statusMessage])
Argument | Definition |
---|---|
|
Specifies the request ID |
|
Specifies which one of the following operations to perform:
|
|
Required for the
|
|
Required for the |
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.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 |
---|---|
|
Specifies which one of the following operations to perform:
|
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.6 Submit Job Requests to Oracle Enterprise Scheduler
Command Category: Application Management Commands
Use with WLST: Online
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 |
---|---|
|
Name of the hosting application for the job. |
|
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: |
|
Optional. Specifies which one of the following scheduling methods to use:
See Examples for examples. |
|
Optional. Specifies a short description for the job request. |
|
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: |
|
Optional. Specifies the name of the schedule if you use the recurring ( |
|
Optional. Specifies a string value that describes the ad-hoc schedule. By default, the value is "Custom Ad-Hoc Schedule". |
|
Optional. Specifies the time for a "one time" execution. The format is: HH:MM:SS:DD:MM:YYYY |
|
Optional. Specifies the start time for a recurring schedule. The format is: HH:MM:SS:DD:MM:YYYY |
|
Optional. Specifies the frequency of a recurring schedule. The valid values are: |
|
Optional. An integer value that specifies repeat interval of a recurring schedule. The default value is "1". |
|
Optional. Specifies the maximum number of repetitions for a request. |
|
Optional. Specifies the end time for a recurring schedule. The format is: HH:MM:SS:DD:MM:YYYY |
|
Optional. Specifies the month of the year if |
|
Optional. Specifies the week of a month. Valid values are: |
|
Optional. Specifies the day of the week. Valid values are: |
|
Optional. Specifies a specific day of month. Valid values are: |
|
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 |
---|---|
|
|
|
|
|
|
-
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
andPRIORITY
=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
andschDesc
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
andschDesc
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.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 |
---|---|
|
Specifies which of the following operations to perform on the job:
|
|
Specifies the logical name of the job's hosting application. |
|
Optional. Specifies the name of the job definition. For the create, delete, or update operations, a default package |
|
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: |
|
Optional. Specifies a description for a new job definition. |
|
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 |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
-
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 ofHOSTING_APP
:manageSchedulerJobDefn('SHOW',HOSTING_APP,jobName=JOB_DEF_PREDEF)
-
Create the new job definition
/oracle/apps/ess/custom/TestJob_wlst
in the namespace ofHOSTING_APP
with thejobType
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 theHOSTING_APP
namespace with thejobType
/oracle/as/ess/core/JavaJobType
and a description with the value ofJOB_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 theHOSTING_APP
namespace with thejobType
/oracle/as/ess/core/JavaJobType
and a description and parameters defined byJOB_DESC
andPARAMS
: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 descriptionJOB_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 propertiesPARAMS
:manageSchedulerJobDefn('UPDATE',HOSTING_APP,jobName=JOB_DEF_NAME,props=PARAMS)
-
Delete the job definition
/oracle/apps/ess/custom/
JOB_DEF_NAME
inHOSTING_APP
:manageSchedulerJobDefn('DELETE',HOSTING_APP,jobName=JOB_DEF_NAME)
-
Customize the prepackaged job definition
JOB_DEF_PREDEF
inHOSTING_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.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 |
---|---|
|
Specifies which of the following operations to perform on the job:
|
|
Specifies the logical name of the job's hosting application. |
|
Optional. Specifies the name of the schedule definition. For the create, delete, and update operations, a default package named |
|
Optional. Specifies a description for the schedule definition when creating or updating a definition. |
|
Optional. Specifies the start time for a recurring event. The format is: HH:MM:SS:DD:MM:YYYY |
|
Optional. Frequency of recurrence. Valid values are: If you use any of the following options: If you use the If you use the |
|
Optional. Specifies the repeat interval used with the |
|
Optional. Specifies the maximum number of repetitions for a request. This value is an integer. |
|
Optional. Specifies the end time for recurrence. Format: HH:MM:SS:DD:MM:YYYY |
|
Optional. Specifies the month of the year if |
|
Optional. Specifies the week of a month. Valid values are |
|
Optional. Specifies the day of a week. Valid values are |
|
Optional. Specifies a day of month. Valid values are |
3.2.8.3 Examples
The following variables are used in these examples:
Variable | Value |
---|---|
|
|
|
|
|
|
|
|
-
Show all schedule definitions present in the namespace of
HOSTING_APP
:manageSchedulerSchedule('SHOW',HOSTING_APP)
-
Show the details of the
HOSTING_APP
schedule definitionPREDEF_SCHEDULE
:manageSchedulerSchedule('SHOW',HOSTING_APP,schName=PREDEF_SCHEDULE)
-
Create a new recurring schedule definition named
/oracle/apps/ess/custom/MyWlstSchedule
in the namespace ofHOSTING_APP
and with the descriptionSCH_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 ofHOSTING_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 ofHOSTING_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 ofHOSTING_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 descriptionSCH_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.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 |
---|---|
|
Optional. Specifies a description for the batch delete request. |
|
Optional. Specifies the fully qualified name of the schedule (pre-defined) to use. The default package, if none is specified, is: |
|
Optional. Specifies the time to start the request. Format: HH:MM:SS:DD:MM:YYYY |
|
Optional. The time the request should terminate. Format: HH:MM:SS:DD:MM:YYYY |
|
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 |
---|---|---|
|
String |
|
|
String |
|
|
String |
|
|
String |
|
|
String |
|
|
Integer |
|
|
Integer |
|
|
Integer |
|
|
Integer |
|
|
Integer |
|
|
Long |
|
Parameter | Default Value | Description |
---|---|---|
|
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. |
|
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. |
|
null (none) |
Specifies the string representation of the job definition |
|
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. |
|
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. |
|
null (none) |
Specifies a minimum age, in days, before a request that completed is eligible for deletion. |
|
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 |
|
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 |
|
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 |
|
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 |
|
null (none) |
Specifies the maximum number of requests to be processed by the batch delete job. If null or zero ( |
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 isJAVA_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.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 |
---|---|
Bind a work assignment |
|
Create a custom workshift |
|
Delete work assignment metadata |
|
Delete workshift metadata |
|
Query all processor bindings |
|
Query work assignment metadata |
|
Query schedule metadata for work allocation |
|
Query workshift metadata |
|
Remove a processor binding |
|
Update workshift resources |
3.4.1 addProcessorBinding
Command Category: Application Management Commands
Use with WLST: Online
3.4.1.2 Syntax
addProcessorBinding(workAssignmentName,server=serverName, [isExclusive=None][scope])
Argument | Definition |
---|---|
|
Specifies the name of the work assignment to bind. |
|
Specifies the name of the server to which to bind. |
|
Optional. Specifies whether the binding is exclusive ( |
|
Optional. Can be
|
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 |
---|---|
|
Specifies the name of the workshift to create. |
|
Specifies the maximum number of threads that can be allocated on each server instance. |
|
Specifies the maximum number of PL/SQL jobs that can be active in the isolation group. Use |
|
Specifies the number of async Java jobs that can be active in the isolation group. Use -1 to specify no limit. |
|
Optional. Specifies a description for the workshift. |
|
Optional. Specifies the name of the schedule to use for the workshift.
|
|
Specifies the number of minutes the workshift is active each time the schedule runs. Required if the |
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 |
---|---|
|
Specifies the name of the custom work assignment to delete. |
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 |
---|---|
|
Specifies the name of the custom workshift to delete. |
3.4.5 queryProcessorBindings
Command Category: Application Management Commands
Use with WLST: Online
3.4.5.2 Syntax
queryProcessorBindings(server=
serverName)
Argument | Definition |
---|---|
|
Specifies the name of the server to query. |
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 |
---|---|
|
Optional. Specifies a work assignment name. |
|
Optional. Specifies a work assignment package. |
|
Optional. Comma-separated list of one or more of the following options:
|
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 |
---|---|
|
Optional. Specifies the schedule name. |
|
Optional. Specifies the schedule package. |
|
Optional. Comma-separated list of one or more of the following options:
|
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 |
---|---|
|
Optional. Specifies the workshift name. |
|
Optional. Specifies the workshift package. |
|
Optional. Comma-separated list of one or more of the following options:
|
3.4.9 removeProcessorBinding
Command Category: Application Management Commands
Use with WLST: Online
3.4.9.2 Syntax
removeProcessorBinding(workAssignmentName, server=serverName)
Argument | Definition |
---|---|
|
Specifies the name of the work assignment to unbind. |
|
Specifies the name of the server from which to unbind. |
3.4.10 updateWorkshift
Command Category: Application Management Commands
Use with WLST: Online
3.4.10.2 Syntax
updateWorkshift(workshiftName,[alloc=None],[plsqlLimit=None], [asyncJavaLimit=None])
Argument | Definition |
---|---|
|
Specifies the name of the workshift to update. |
|
Optional. Specifies the maximum local thread allocation. |
|
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. |
|
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.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 |
---|---|
|
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. |
|
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. |
|
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 If an application is not processing requests, make sure the processor is running and the application is both deployed and enabled on the server. |
|
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. |
|
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. |
|
Dumps detailed information on work assignments, including maximum resources and current allocations. The This dump may not show all completed bindings. Use If there are no bindings, this dump shows information on the default work assignment. |
|
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 |
---|---|
|
The dump name from Table 3-3. |
|
The name of the application. |
|
Optional. You can connect to the AdminServer or a managed server. If you connect to the AdminServer, you must use the |
3.5.1.3 describeDump
Lists help for a specific dump type.
3.5.1.3.1 Syntax
describeDump(name="dump_name")
Argument | Definition |
---|---|
|
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:
s
h 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 |
---|---|
|
Adds a configuration parameter |
|
Modifies a configuration parameter |
|
Deletes a configuration parameter. |
|
Specifies the name of the hosting application. |
|
Specifies the type of the configuration parameter. Possible types are:
|
|
Specifies the name of the configuration parameter. |
|
Specifies the value of the configuration parameter. |
|
Specifies the name of the file that contains the server connection parameters. If not specified, the default file |
|
Specifies the hostname or IP address of the WLS server. |
|
Specifies the port number to connect. |
|
Specifies the user name. |
|
Specifies the name of the server on which ESSAPP is running. |
|
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.5 Examples
-
Add a user-defined parameter
foo
with valuebar
for the applicationmyapp
:essManageRuntimeConfig.sh -a -A myapp -t APP -n foo -v bar
-
Get the value of user-defined parameter
foo
for the applicationmyapp
: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 applicationmyapp
:essManageRuntimeConfig.sh -m -A myapp -t APP -n foo -v barone
-
Delete the user-defined parameter
foo
for applicationmyapp
: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, |
Specifies one of the following types of content to get:
If this option is not specified, both log and output content are retrieved. |
|
Specifies the directory where content is stored. The default is the current directory. |
|
Specifies the number of lines of log to retrieve. The default is 1000. |
|
Specifies where log lines are presented. The valid values are |
|
Specifies the name of the file that contains the server connection parameters. If not specified, the default file |
|
Specifies the hostname or IP address of the WLS server. |
|
Specifies the port number to connect. |
|
Specifies the user name. |
|
Specifies the name of the server on which ESSAPP is running. |
|
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.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
and124
and save it in/tmp
:essGetOutputContent.sh -d "/tmp" 123 124
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 |
---|---|
|
Specifies the hosting application name. |
|
Specifies one of the following request states:
|
|
Specifies the running time in days. |
|
Specifies the running time in hours. |
|
Specifies the running time in minutes. |
|
Specifies the name of the file that contains the server connection parameters. If not specified, the default file |
|
Specifies the hostname or IP address of the WLS server. |
|
Specifies the port number to connect. |
|
Specifies the user name. |
|
Specifies the name of the server on which ESSAPP is running. |
|
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.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.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 |
---|---|
|
Cancels request. |
|
Recovers a request |
|
Marks a request as completed. |
|
Gets a request's details. |
|
When marking request as complete, specifies one of the following final disposition statuses:
|
|
Specifies a qualifying message that describes the operation when marking request as complete. |
|
Specifies the name of the file that contains the server connection parameters. If not specified, the default file |
|
Specifies the hostname or IP address of the WLS server. |
|
Specifies the port number to connect. |
|
Specifies the user name. |
|
Specifies the name of the server on which ESSAPP is running. |
|
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.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.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 |
---|---|
|
Starts the Oracle Enterprise Scheduler processor thread. |
|
Stops the Oracle Enterprise Scheduler processor thread. |
|
Displays the current status of the Oracle Enterprise Scheduler processor thread. |
|
Specifies the name of the file that contains the server connection parameters. If not specified, the default file |
|
Specifies the hostname or IP address of the WLS server. |
|
Specifies the port number to connect. |
|
Specifies the user name. |
|
Specifies the name of the server on which ESSAPP is running. |
|
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.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.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 |
---|---|
|
Names the job's hosting application. |
|
Names the job definition to be used for the current request. |
|
Specifies a short description for the job request |
|
Names the predefined schedule definition. |
|
Names the schedule if you define the schedule using |
|
Specifies a description of the ad-hoc schedule being defined. The default value is "Custom Ad-Hoc Schedule". |
|
Specifies that the job should be executed immediately. This is used as the default if no other schedule is specified. |
|
Specifies the time for one time execution. Format: |
|
Specifies that the schedule recurs. |
|
Specifies the start time for a recurring schedule. Format: |
|
Specifies the frequency of recurrence. Valid values: [ |
|
Specifies an integer value that represents the frequency repeat interval. |
|
Specifies an integer value that is the maximum number of repetitions. |
|
Specifies the recurrence end time. Format: |
|
Defines the month of the year if the frequency is |
|
Specifies the week of a month. Valid values are: [ |
|
Specifies the day of a week. Valid values are: [ |
|
Specifies a specific day of month. Valid values are: [ |
|
Specifies other request parameters/properties specified as: |
|
Specifies the name of the file that contains the server connection parameters. If not specified, the default file |
|
Specifies the hostname or IP address of the WLS server. |
|
Specifies the port number to connect. |
|
Specifies the user name. |
|
Specifies the name of the server on which ESSAPP is running. |
|
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.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
andPRIORITY
=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 |
---|---|
|
Specifies the logical name of the hosting application for a job. |
|
Specifies the name of the job definition. For the create, delete, and update operations, the default package |
|
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: |
|
Specifies a description of the job definition |
|
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 |
|
Creates a new job definition. Used with |
|
Deletes an existing job definition. Used with |
|
Modifies customizable properties of the job definition. Properties can be:
Used with |
|
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 |
|
Specifies other request parameters/properties specified as: |
|
Specifies the name of the file that contains the server connection parameters. If not specified, the default file |
|
Specifies the hostname or IP address of the WLS server. |
|
Specifies the port number to connect. |
|
Specifies the user name. |
|
Specifies the name of the server on which ESSAPP is running. |
|
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.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 ofHOSTING_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 ofHOSTING_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 ofHOSTING_APP
with the job type/oracle/as/ess/core/JavaJobType
and with the descriptionJOB_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 ofHOSTING_APP
with the job type/oracle/as/ess/core/JavaJobType
and with the descriptionJOB_DESC
and the propertiesSYS_retries
andmyParam
: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 descriptionJOB_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 propertiesSYS_retries
andmyParam
: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
inHOSTING_APP
:essManageJobDefn.sh HOSTING_APP -D -j JOB_DEF_NAME
-
Customize the prepackaged job definition
JOB_DEF_PREDEF
inHOSTING_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 |
---|---|
|
Specifies the logical name of the hosting application. |
|
Specifies the name of the schedule definition. For the create, delete, and update operations, the default package |
|
Specifies a description of the schedule definition |
|
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 |
|
Creates a new schedule definition. Used with |
|
Deletes an existing schedule definition. Used with |
|
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 |
|
Specifies the recurrence start time. Format: |
|
Specifies the frequency of recurrence. Valid values: Possible options:
|
|
Specifies an integer value that is used as the repeat interval for the |
|
Specifies an integer value that is the maximum number of repetitions. |
|
Specifies the recurrence end time. Format: |
|
Defines the month of the year if the frequency is YEAR. Valid values are: [ |
|
Specifies the name of the file that contains the server connection parameters. If not specified, the default file |
|
Specifies the hostname or IP address of the WLS server. |
|
Specifies the port number to connect. |
|
Specifies the user name. |
|
Specifies the name of the server on which ESSAPP is running. |
|
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.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
ofHOSTING_APP
:essManageSchedule.sh HOSTING_APP -S -n PREDEF_SCHEDULE
-
Create a new recurring schedule definition named
/oracle/apps/ess/custom/MyWlstSchedule
in the namespace ofHOSTING_APP
with the descriptionSCH_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 ofHOSTING_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 ofHOSTING_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 ofHOSTING_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 descriptionSCH_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
inHOSTING_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 |
---|---|
|
Specifies a description for the batch delete request. |
|
Specifies the fully qualified name of the schedule to use. The default package (used if the package is not specified) is |
|
Specifies the time at which the request is to be started. Format: |
|
Specifies the time past which the request should not run. Format: |
|
Specifies other request parameters/properties specified as: |
|
Specifies the name of the file that contains the server connection parameters. If not specified, the default file |
|
Specifies the hostname or IP address of the WLS server. |
|
Specifies the port number to connect. |
|
Specifies the user name. |
|
Specifies the name of the server on which ESSAPP is running. |
|
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.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 isJobDefinition://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