Skip to end of metadata
Go to start of metadata

Question: Can job dependencies be defined for the JobScheduler?


Using job chains

Sequences of Jobs can easily be configured in Job Chains that guarantee that a successor job is not invoked if a previous job provokes an error. Job errors can be configured to be detected by return code (for executable files), signals (for Unix only), availability of output to stderr and by errors that are raised either by API methods or by SQL exceptions (and normal SQL errors).

Job chains are nodes of jobs that are organized in a sequence, every node is given a distinct state. An Order proceeds along the job nodes in a job chain one after the other. Should a processing error occur, then the order can be configured to stop, to repeat (setback) or to be removed from the job chain.

In addition to this you could use Monitor scripts to implement more complex conditions for job starts in any of the languages Java and Javascript. The Job Scheduler API provides methods that can be used in scripts that implement their own business logic for conditional job starts.

Moreover this API method can be exposed to Oracle pl/sql procedures or functions (by Java classes in the database) that enable jobs to be launched in a transactional environment (e.g. start a job exlusively after commit has been invoked) either by triggers or e.g. by PL/SQL procedures.

Using successor jobs and orders

You could configure any jobs to succeed the current job based on it's execution result. Thes example makes use of both a successor job and a the execution of a job chain by adding an order:

See also