Oracle Scheduler – REST APIs
The below are the list of services that can be used for managing Oracle DBMS scheduler objects
F1-DBMSProgram Service
The F1-DBMSProgram service can be used to Add, read, change, and delete a DBMS Scheduler Program object. There are currently two types of program that can be created:
Program associated with a batch code
Program to set/unset options
If a list of options is provided, it will create a program to set/unset options. Otherwise, it will create a program associated with a batch code.
Parameter Name
Description
Action
Specifies the action to be performed on the scheduler object.
Valid values are:
ADD – Add
READ – Read
CHNG – Change
DEL – Delete
Name
The name of the scheduler program on which the operation needs to be performed.
description
Description of the scheduler program.
batchCode
Batch code of the product batch process for which the program is being created.
userId
ID under which the batch process will run.
threadCount
Use Thread Count to control whether a background process is run single threaded or in multiple parallel threads. This value defines the total number of threads that have been scheduled
businessDate
Process date to be used for batch job. If no value is provided, the current date will be used. The format of the date must be in a recognizable format.
maxTimeoutMins
Maximum timeout, in minutes, for transactions to avoid ORA-01555 Snapshot too old errors. Default is 15.
rerunNumber
Is only used for product background processes that download information that belongs to given run number. It should only be supplied if you need to download an historical run (rather than the latest run).
threadPool
The default threadpool to use. The installation default threadpool is 'DEFAULT'.
minRunStatus
Minimum Run Status that will cause this procedure to exit. The default is RUN_STAT_COMPLETED (40). Other values supported:
10 - RUN_STAT_PENDING
20 - RUN_STAT_IN_PROGRESS
30 - RUN_STAT_ERROR
40 - RUN_STAT_COMPLETED
raiseError
If the min_run_status is set a value less than 40, this parameter is set to true and the job status matches the value of the min_run_status then raise an application error. This allows the chain to support conditional branches or stop chains on conditions. Default is false.
threadNotifications
Whether if an error in any thread should trigger a notification event. Default is true. See Notification Options for more information.
parmName
(list parameter)
The name of the parameter to the batch process, if applicable.
parmValue
(list parameter)
The corresponding value of the parameter to the batch process, if applicable. parmValue and parmName pairs should be defined in repeated lists.
optionName
(list parameter)
Option name to set/unset before program is executed
optionScope
(list parameter)
Corresponding scope for the options to set/unset before program is executed. The scope can be global or per batch code.
optionValue
(list parameter)
Corresponding value for the option name.
F1-DBMSChain Service
The F1-DBMSChain service provides the ability to add, read, change, or delete a DBMS Scheduler Chain object based on the action provided.
Parameter Name
Description
action
Specifies the action to be performed on the scheduler object.
Valid values are:
ADD – Add
READ – Read
CHNG – Change
DEL – Delete
name
The name of the scheduler chain on which the operation needs to be performed.
description
Description of the scheduler chain.
stepName
(list parameter)
The name of the step within the scheduler chain
programName
(list parameter)
The program name that is part of the corresponding step.
condition
(list parameter)
A condition that must be met to complete the step and to transition to the next step or to end the chain execution.
Note: A step called ‘END’ step must be included in the chain definition that includes the condition to meet for the chain to end.
F1- DBMSSchedule Service
The F1-DBMSSchedule service allows the ability to add, read, change, or delete a DBMS Scheduler’s schedule object based on the action provided.
Parameter Name
Description
action
Specifies the action to be performed on the scheduler object.
Valid values are:
ADD – Add
READ – Read
CHNG – Change
DEL – Delete
name
The name of the scheduler’s schedule object being created/edited/read/deleted.
description
Description of the schedule.
repeatInterval
The schedule’s repeat interval to be specified in the format supported by Oracle DBMS Scheduler. (Refer to Oracle DBMS scheduler’s documentation)
F1-DBMSJob Service
The F1-DBMSJob service provides the ability to add, read, change, or deletes a DBMS Scheduler’s job object based on the action provided.
The job can be associated with either a program or a chain by populating the appropriate field. A validation error will result if both or neither of the fields are populated.
If schedule name is not populated, it will be for immediate execution.
When called for change action, the job is added if it does not exist, else it is replaced with new definition.
Parameter Name
Description
Action
Specifies the action to be performed on the scheduler object.
Valid values are:
ADD – Add
READ – Read
CHNG – Change
DEL – Delete
Name
The name of the scheduler’s job object being created/edited/read/deleted.
Description
Description of the scheduler’s job object.
programName
The name of the scheduler’s program to which this job should be associated with.
chainName
The name of the scheduler’s chain to which this job should be associated with.
scheduleName
The name to the schedule’s schedule object based on which this job needs to be executed.
enabled
Specified if this job should be enabled or disabled.
F1-DBMSJob Service
This service returns a list of name and descriptions of DBMS Scheduler objects based on the type and name (if specified) provided.
Parameter Name
Description
Type
Specifies the type of scheduler object whose list is to be retrieved. Valid values are:
PROG – DBMS Scheduler Program
CHAN – DBMS Scheduler Chain
SCHD – DBMS Scheduler Schedule
JOB – DBMS Scheduler Job
Name
Name to search with. Appending ‘%’ to the end of name will perform a ‘like’ query resulting in a list of objects starting with the name provided.
F1-DBMSSubmitJob Service
The F1-DBMSSubmitJob service submits a scheduler job for execution.
Parameter Name
Description
Name
Name of the scheduler’s job object to be submitted for execution.
F1-DBMSGetJobDetails Service
The F1-DBMSGetJobDetails service retrieves the details of DBMS Scheduler job based on job name. More specifically, this retrieves the steps and the step state of the DBMS scheduler job.
Parameter Name
Description
Name
Name of the scheduler’s job object whose details are to retrieved/read.
Status
Status of the DBMS scheduler job.
startDate
The start date of the DBMS scheduler job.
runDuration
The run duration of the DBMS scheduler job.
stepName
(list parameter of "steps" list)
The name of the DBMS Scheduler job’s step.
Status
(list parameter of "steps" list)
The status of the corresponding step.
runDuration
The run duration of the corresponding step.
F1-DBMSGetJobs Service
The F1-DBMSGetJobs service retrieves a list of scheduler jobs based on the status of RUNNING or COMPLETED. A date range can be specified to limit the list.
Note: The maximum numbers of records returned for completed jobs is 100.
This retrieves the list of jobs for COMPLETED jobs, list of jobs with steps for RUNNING chains.
The following criteria (from top to bottom) is considered for determining if a job run is IN PROGRESS, or if it is COMPLETED:
If a DBMS job run has at least one step running, the job is considered as IN PROGRESS.
If at least one step has failed, it is considered COMPLETED.
If at least one step has not been started, and no steps have failed, it is considered IN PROGRESS.
If none of the above is true (that is, if all steps are completed), it is considered COMPLETED.
Parameter Name
Description
jobStatus
The status based on which the list of DBMS scheduler jobs list must be retrieved.
Valid values are:
RUN – Running Jobs
COMP – Completed Jobs
startDate
The start date of the date range for which the details have to be retrieved.
endDate
The end date of the date range for which the details have to be retrieved.
jobStatus
(list parameter of "jobs" list)
The status of the job.
runDate
(list parameter of "jobs" list)
The execution date of the corresponding job.
runDuration
(list parameter of "jobs" list)
The run duration of the corresponding job.
chainName
(list parameter of "jobs" list)
The name of the associated chain (if applicable)
stepName
(list parameter of "steps" list)
The name of the chain step within the job.
stepState
(list parameter of "steps" list)
The state of the corresponding step.
batchCode
(list parameter of "steps" list)
The batch code of the corresponding step.
batchNumber
(list parameter of "steps" list)
The batch number of the corresponding step.
batchRerunNumber
(list parameter of "steps" list)
The batch rerun number of the corresponding step.
Error Details
(list parameter of "steps" list)
The error corresponding to the step (if applicable).
F1-DBMSCancelJob Service
The F1-DBMSCancelJob service cancels a DBMS schedule job if it is running.
Parameter Name
Description
name
The name of the DBMS scheduler job to cancel.
F1-DBMSRestartThread Service
The F1-DBMSRestartThread service can be used for restarting a failed batch thread.
Parameter Name
Description
batchCode
Batch code of the batch process for which the failed thread needs to be restarted.
userId
User Id of the user using which the batch thread needs to be restarted.
threadNumber
The thread number of the batch program that needs to be restarted.
threadCount
Use Thread Count to control whether a background process is run single threaded or in multiple parallel threads. This value defines the total number of threads that have been scheduled
businessDate
Process date to be used for batch job. If no value is provided, the current date will be used. The format of the date must be in a recognizable format.
maxTimeoutMins
Maximum timeout, in minutes, for transactions to avoid ORA-01555 Snapshot too old errors. Default is 15.
rerunNumber
Is only used for batch processes that download information that belongs to given run number. It should only be supplied if you need to download an historical run (rather than the latest run).
threadPool
The default threadpool to use. The installation default threadpool is 'DEFAULT'.
parmName
(list parameter)
The name of the parameter to the batch process, if applicable.
parmValue
(list parameter)
The corresponding value of the parameter to the OUAF batch process, if applicable. parmValue and parmName pairs should be defined in repeated lists.
F1-DBMSRestartChain Service
The F1-DBMSRestartChain service can be used to restart DBMS scheduler Chain. The service determines the failed step and changes status so the chain can resume
Parameter Name
Description
jobName
The name of the DBMS scheduler job to cancel.