9 Replies Latest reply: Aug 29, 2011 3:41 PM by Ric NameToUpdate RSS

    Job dependencies for jobs with different schedules

    Steve Westerhout

      Hello,

       

      I have a situation where job A runs business days and the 1st of the month, job B runs the 1st of the month, and job C runs on Business days and the 1st of the month. When the 1st of the month does roll around I need the job order to be A then B then C. Every other business day I need the job order to be A then C. I tried to handle this with a scheduling group and it's setting 'Adjust Conditions'. From what I can see though this allows jobs A and C to run at the same time on days when B is not scheduled.

       

      Does anyone have any suggestions?

        • 1. Re: Job dependencies for jobs with different schedules
          Sheen NameToUpdate

           

           

           

          There are many whys to achieve this. Simple way in my view is to create 2 job streams of same jobs with different scheduling as below

          Job A > Job B > Job C with first of every month in thescheduling

          Job A > Job C with all business days except first of amonth (I think –D1, not sure though)

           

          Regards,

          Sheen

          • 2. Re: Job dependencies for jobs with different schedules
            Steve Westerhout

            Hello,

             

            I don't know if this is the best solution, but I will probably end up doing it this way.

            • 3. Re: Job dependencies for jobs with different schedules
              Robert Stinnett

              Hi Steve -

               

              You didn't say if this was Distirbuted or Mainframe, so I am going to assume Distributed, but the same functionality is available on the mainframe.  You are going to make use of a Scheduling Group and add a paramter to your config.dat file for Control-M Server.

               

              First, let's talk about the paramter change - you need to add

              CTM_GROUP_ADJUST_DUMMY set to "Y" in your config.dat file Control-M/Server.  This is going to tell Control-M to create a DUMMY job automatically on days when the prerequisite job does not exist.  See the Control-M/Admin guide for more info on this paramter.

               

              Next, we're going to create our scheduling group and set the "Adjust Conditions" parameter to "Yes".

               

              controlm-schedgroup-adjustcondition.png

               

              Now go ahead and create your jobs inside this scheduling group.  For this example I created a three job example flow.  Jobs "ALWAYSRUN_A" and "ALWAYSRUN_C" run every day, and "SOMETIMESRUN_B" only runs two days out of the month.

               

              The schedule is currently for a day when SOMETIMESRUN_B does is not scheduled for execution.

               

              So here is what Enterprise Manager looks like:

               

              em-jobflow-wdummy.png

              Notice there is a SOMETIMESRUNS_B job there?  Let's take a look at it to see what the heck is going on.

               

              dummyjob-view.png

              Control-M created the dummy job for us since SOMETIMESRUN_B was not scheduled to run today.  On days when it is scheduled to run the actual job would be used.

               

              Hope this helps -- drop a line if you need more help!

               

              Thanks,

               

              Robert

              • 4. Re: Job dependencies for jobs with different schedules
                Sheen NameToUpdate

                That’s a new learning for me Robert. Thanks very much.

                I believe this feature is available only in 6.4

                 

                Many Thanks

                Sheen

                • 5. Re: Job dependencies for jobs with different schedules
                  Robert Stinnett

                  No problem, glad it could be of help!  I'm not sure what version this first showed up on, unfortunately, though I can tell you I'm certainly glad it

                  is available!

                   

                  Robert

                  • 6. Re: Job dependencies for jobs with different schedules
                    Steve Westerhout

                    Unfortunately I am using version 6.2 and it doesn't seem to put in the 'dummy' job. Job C will be allowed to run without B there when I check adjust condition on the scheduling group, but the order of A then B, then C is not maintained. For now I have gone with using maybe conditions.

                     

                    ctmldnrs -CALCCOND -ADDMODE NO

                     

                    and

                     

                    ctmldnrs -LOAD "M-*"

                    • 7. Re: Job dependencies for jobs with different schedules
                      Roman Kreindl

                      Hi,

                       

                      I am reactivating this thread because I have a problem that is related to this one. I am already using Scheduling Groups with the CTM_GROUP_ADJUST_DUMMY parameter, which is working fine. Additionaly, I have set CTM_ADJUST_COND_SCOPE to AJF, so Control-M orders dummy jobs not only within the related group but within the whole active jobs file (at least that is what the manual says).

                       

                      I have defined two scheduling groups: one is running only on the last workday of the month (L01), the other one is running on every other workday except the last (-L01). In a job from the first group I have defined a dependency to a job from the second group.

                       

                      But when I order the scheduling group on a normal workday, only the jobs from the "-L01" group are ordered, but no dummy jobs from the "L01" group. The dependencies are not satisfied.

                       

                      What am I doing wrong?

                       

                      Thanks,

                      Roman

                      • 8. Re: Job dependencies for jobs with different schedules
                        Steve Westerhout

                        Hi Roman,

                         

                        Sorry, but I have not been online much lately. I hope that you have found a solution.

                         

                        If not all that I can reccommend is to check your version. At my company we are still on the antiquated version 6.2 which does not seem to properly support scheduling groups.

                        • 9. Job dependencies for jobs with different schedules
                          Ric NameToUpdate

                          Just use a dummy job to bridge the gap on days the second job doesn't run.

                           

                          like this

                           

                          JobA (runs everyday) -publishes out condition JobA-OK

                           

                          JobB (runs on first of the month) -waits for in condition JobA-OK and publishes JobB-OK

                           

                          DumJobB (runs the rest of the month) -waits for in condition JobA-OK and publishes DumJobB-Ok

                           

                          JobC (runs everyday) - waits for JobB-OK OR DumJobB-OK

                           

                          JobA --> (JobB or DumJobB) --> JobC