Prerequisites
Prerequisites hold up a job, preventing it from being submitted. When the prerequisite job completes, the job will be freed up for execution.
.png)
To add a prerequisite job to the list fill in the name or click on the orange button beside the field and select a job from the Job list and click Apply to add.
.png)
Click More to add additional Prerequisite jobs. Click Less to remove the last item from the list.
A prerequisite is a job that keeps other jobs from executing until it is competed. For instance, you may have a number of jobs that can only run if a previous job has completed updating a file or a database.
In addition to the basic prerequisite, you can set up to five conditions to each prerequisite job. These conditional algorithms allow you to control whether a prerequisite releases a subsequent job based on the evaluation of the statement.
If no conditions are added, the currently selected job will hold up the subsequent job until it completes. By entering commands in this area, additional conditions may be put on the prerequisite. The if condition has a variable or parameter (from the parameter list), an operand and a value that must be met to allow the prerequisite to release the job.
As many as five conditions may be added to the prerequisite definition. The relationship between the conditions is an OR condition. In other words, if any of the conditions is met it will release the subsequent job. To remove conditions, simply highlight the command to remove and press the delete button. To learn more about the operators and variables that are used in the initiates list, click on the links.
Setting prerequisite conditions
The prerequisites are entered in a list that can be associated with any job entry in the database. All the jobs on this list must complete successfully before the job is allowed to proceed.
Each line of this list specifies one job either on the local system or on a remote system. The format of each line is detailed below:
General format:
job_name [IF condition]
The job name can be any of the following:
job
[directory]job
[directory.subdirectory]job
[.subdirectory]job
Any of the pieces of the name that are left off are picked up by default from the current job. Here is an example of a typical prerequisite list:
[DEMO.A]REPORT_3.prerequisites
IF COUNT .NE. 4 THEN UPDATE_C
UPDATE_B
UPDATE_A
The addition of a node name to a job name indicates that the system is to send a message to that remote node requesting a return message when the prerequisite job completes. This is used in a "peer-to-peer" network configuration where another system (or cluster) has its own scheduling database and job synchronization is needed between these two independent systems.
One very important point is that the SET_ID is used to clarify which job is a prerequisite job. In other words if a job C has jobs A and B as prerequisites they must have completed successfully and be members of the same set (i.e. have the same SET_ID) as job C. The mechanism that can be used to propagate the SET_ID is the initiate list. In this example all three jobs A, B, and C should be initiate by the same parent job.
Using variables, jobs can be selectively suppressed depending on the results of a variable evaluation connected to one or more of the jobs in its prerequisite list.
For example:
JOB_1, IF job_set == complete
JOB_2
JOB_3, IF node == run, IF job_set == complete