Advanced Scheduling 2: Scheduling and Synchronizing Jobs in Parallel
Procedure
Target
Assume that you have the constellation shown in the diagram below: One job should launch two additional programs that run in parallel. When both of these are done, a fourth job should start.
You want to implement this consolidation in a single job. The advantage: You only have to start the master job to start the whole process.
Introduction
The diagram below shows how this process could be implemented. An initial report schedules Job 1, which does preparatory work for Jobs 2 and 3 and then schedules them. (You could guarantee that Jobs 2 and 3 start after Job 1 with start after predecessor scheduling -- building a job chain between job1 and jobs 2 and 3 with a job or report that ran previously. For more information, see Advanced Scheduling 1: Building Chains of Jobs).
The synchronizing mechanism is provided by a small program that updates a status flag shared by Jobs 2 and 3. The first job sets the status and quits. The second job to run the status program schedules job 4.