This chapter describes Oracle Enterprise Scheduler custom WLST commands for getting job request content, managing requests, and managing server and configuration. It includes command syntax, arguments and examples.
Use the Oracle Enterprise Scheduler commands in the categories listed in Table 21-1 to manage configuration, servers, logs, and job requests.
Note:
To use these custom WLST commands, you must invoke the WLST script from the Oracle Common home. See "Using Custom WLST Commands" in the Oracle Fusion Middleware Administrator's Guide.
When running these WLST commands, you must have the following JARs on your classpath:
MW_HOME/oracle_common/modules/oracle.jmx_11.1.1/jmxframework.jar
WL_HOME/server/lib/weblogic.jar
MW_HOME/ORACLE_HOME/ess/lib/ess-admin.jar
Use the Enterprise Scheduler commands listed in Table 21-1 to manage the Enterprise Scheduler server, configuration, job requests, and logs. In the Use with WLST 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 21-1 Oracle Enterprise Scheduler Management Commands
Use this command... | To... | Use with WLST... |
---|---|---|
Get the log and output data files for a request after its execution is completed. |
Online |
|
Cancel, recover, or complete request state manually. |
Online |
|
Add, modify, delete and display various configuration parameters. |
Online |
|
Start, stop or get status of the Enterprise Scheduler application running on the server. |
Online |
|
Search and list requests based upon hosting application name, state or elapsed time of execution. |
Online |
Command Category: ESS
Use with WLST: Online
essGetOutputContent(requestId, contentType, logLines, outDir)
Argument | Definition |
---|---|
|
The request ID. |
|
Type of the content to handle. Can be LOG, OUTPUT, BINARY_OUTPUT or TEXT_OUTPUT. By default, the OUTPUT contentType checks for both BINARY_OUTPUT and TEXT_OUTPUT contents. |
|
Optional. The number of lines to be read form the request log. Default is 1000. |
|
Optional. The absolute path of the output directory to dump the output files into. Default is the current directory. |
To get the request log for request ID 123.
essGetOutputContent(123, "LOG")
To get all the output of request 123.
essGetOutputContent(123, "OUTPUT")
To get all the output of request 123 and save it in directory /tmp.
essGetOutputContent(123, "OUTPUT", outDir="/tmp")
To get all the text output of request 123 and save it in directory /tmp.
essGetOutputContent(123, "TEXT_OUTPUT", outDir="/tmp")
To get all the binary output of request 123 and save it in directory /tmp.
essGetOutputContent(123, "BINARY_OUTPUT", outDir="/tmp")
To get first 100 lines of the request log for request id 123.
essGetOutputContent(123, "LOG", logLines=100)
Command Category: ESS
Use with WLST: Online
essManageRequest(requestId, operation, asyncStatus, statusMessage)
Argument | Definition |
---|---|
|
The request ID. |
|
The operation to perform: CANCEL, RECOVER, or COMPLETE. |
|
Mandatory when the COMPLETE operation is specified. The status to set for the given request. Must be one of the following:
|
|
Optional. The qualifying status message to describe the operation. |
Command Category: ESS
Use with WLST: Online
essManageRuntimeConfig(app, type, operation, name, val)
Argument | Definition |
---|---|
|
The hosting application name for managing runtime configuration. |
|
The type of configuration property. Can be either APP or ESS. |
|
Optional. The operation to perform. Value can be one of the following: add (add), mod (modify), del (delete), get (get), or getall (get all). The default is getall. |
|
Optional when the getall value is used for operation. The name of the configuration parameter. |
|
Optional when the del, get, or getall value is used for operation. The value to set for the parameter. |
To add an ENV parameter "foo" with value "bar".
essManageRuntimeConfig("myapp", "APP", operation="add", name="foo", val="bar")
To get the value of the ENV parameter "foo".
essManageRuntimeConfig("myapp", "APP", operation="get", name="foo")
To get the list of all the ENV parameters.
essManageRuntimeConfig("myapp", "APP", operation="getall") essManageRuntimeConfig("myapp", "APP")
To modify the value of the ENV parameter "foo" to "barone".
essManageRuntimeConfig("myapp", "APP", operation="mod", name="foo", val="barone")
To delete the ENV parameter "foo".
essManageRuntimeConfig("myapp", "APP", operation="del", name="foo")
To show all parameters of type ESS.
essManageRuntimeConfig("myapp", "ESS")
Command Category: ESS
Use with WLST: Online
Start, stop or get status of the Enterprise Scheduler application running on the server. Starting the Enterprise Scheduler application means to start the Enterprise Scheduler processor thread so that request processing can start. Stopping Enterprise Scheduler means to stop or quiesce the Enterprise Scheduler processor so that no new requests are processed.
If connected to the WLS Administration Server in a cluster, this command would operate upon all nodes in the cluster.
essManageServer(operation)
Argument | Definition |
---|---|
|
The operation to perform. One of START, STOP, or STATUS. |
Command Category: ESS
Use with WLST: Online
Search and list requests based on hosting application name, state or elapsed time of execution. This command can be used to find long running requests.
essQueryRequests(app, state, days, hours, minutes)
Argument | Definition |
---|---|
|
Optional. The name of the hosting application. |
|
Optional. The request state. Can be one of the following (default is RUNNING):
|
|
Optional. Specifies the time in days. |
|
Optional. Specifies the time in hours. |
|
Optional. Specifies the time in minutes. |
To get all the requests in RUNNING state.
essQueryRequests() essQueryRequests(state="RUNNING")
To get all CANCELLED requests.
essQueryRequests(state="CANCELLED")
To get all requests running for more than 2 days.
essQueryRequests(days=2)
To get all requests running for more than 10 hours.
essQueryRequests(hours=10)
To get all requests running for the application "myapp".
essQueryRequests(appName="myapp")