tivolitivoli-work-scheduler

How can I give dependancy to every(repeat Job ) in TWS


How can I add dependency to Every Job for example

there are 2 job in one jobstream,both are every job mean they run at every 30 min.but I want to implement one condition in between. Condition: 2nd job will run only after completion of 1st for every 30 min mean each instance of 2nd job will run only after each instance of 1st job Please give me solution.I need this

Job1
every 30 min
at 10.30

Job2
every 30 min
at 10.30
follow job1


Solution

  • For this scenario you cannot use the every on the job, that let each job to repeat by its own and how you have seen let the 2nd job to run after the 1st job has completed the first time.

    In order to have the dependency considered at each run you have to include the 2 jobs in a job stream and repeat the whole job stream

    There are two possible solutions for that, depending on your scenario:

    1. Use the every on job stream

      SCHEDULE JS1
       ON RUNCYCLE RC1 "FREQ=DAILY;INTERVAL=1"  
        ( SCHEDTIME 1030 EVERY 0030 EVERYENDTIME 1800 )   
       ONOVERLAP ENQUEUE  
      :  
      JOB1  
      
      JOB2  
       FOLLOWS JOB1
      
      END
      
    2. Add a 3rd job after job2 that resubmit the job stream using conman sbs. In this case you can use datecalc to calculate the AT time of the new instance.