1 of 1 people found this helpful
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)
I don't know if this is the best solution, but I will probably end up doing it this way.
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".
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:
Notice there is a SOMETIMESRUNS_B job there? Let's take a look at it to see what the heck is going on.
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!
That’s a new learning for me Robert. Thanks very much.
I believe this feature is available only in 6.4
1 of 1 people found this helpful
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
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
ctmldnrs -LOAD "M-*"
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?
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.
Just use a dummy job to bridge the gap on days the second job doesn't run.
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
An option to enhance the dummy job approach would be to schedule the dummy job on days that the job
requiring the option is not scheduled. This would eliminate the extra dummy job on days that it's not needed.
Look into the "Maybe" concept.
Check out the KSL scripts ADDCOND7 and ADDMAYBE.
A "Maybe" condition is a conditrional dependency. It is defined with a special prefix character notalready used for other Control-M functions. We use "#" (pound/hash).
Job A schedules daily and sets Out of JOBA-OK
Job B schedules monthly. Needs In of JOBA-OK. Sets Out of #JOBB-OK
Job C schedules daily. Needs Ins of JOBA-OK and #JOBB-OK.
We run the ADDCOND7 script at 1600 and 0700 (New day is 1000). The script basically looks for In conditions with the "#" prefix. When found, it sees if any jobs are in the schedule that will satisfy it. If found, the script leaves it alone, as it will be satisfied by processing. If no match, the script adds the "missing" condition, resolving it for the job. This creates the ability of conditional prerequisites without having to create bogus dummy jobs, etc.