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)
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!
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?
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