Issue when defining In Conditions

All questions about Control-M jobs definitions
Post Reply
User avatar
yohcha
Nouveau
Nouveau
Posts: 3
Joined: 02 Jan 2012 12:00

Issue when defining In Conditions

Post by yohcha » 05 Jan 2012 11:50

Hello all,
I have an issue when defining jobs with In Conditions.
I have 4 jobs : job A runs daily (Mon -> Sun) and jobs B and C runs only on Sun.
Job D runs daily (Mon -> Sun). Job D is the successor of A, B and C.
Job A, B and C are not linked between them.
I have created 3 In Conditions for D : 1st is A to D, 2nd is B to D and third is C to D with "AND between all conditions" in IN Conditions relationship.
After ordering the jobs (during the week), A and D are ordered, A runs normally and D doesn't start.
By checking why, it appears that D is waiting for B and C.
My question : how to set up the In Conditions to match my requirement ?

User avatar
sukie
Nouveau
Nouveau
Posts: 11
Joined: 15 Nov 2011 12:00

Post by sukie » 06 Jan 2012 6:22

We use the ctmldnrs utility in such situations, so Monday to Saturday we would have a command line job that runs the following command

ctmldnrs -LOAD JOBB_CONDITION;ctmldnrs -LOAD JOBC_CONDITION

and that would load the missing conditions required for Job D on the days when jobs B and C are not scheduled.

Easier still, create a dummy job to run Mon - Sat which simply outputs the missing conditions.

User avatar
chrisw
Nouveau
Nouveau
Posts: 10
Joined: 15 Aug 2009 12:00

Post by chrisw » 10 Jan 2012 4:57

Hi yohcha

You Could use the MAYBE (#-)Condition.
JOBD will always require JOB A to run and complete, but will only need JOB B and JOB C Conditions if they have been ordered

In JOB D add the following IN Conditions

JOBA-TO-JOBD
#-JOBB-TO-JOBD
#-JOBC-TO-JOBD

In JOB A add JOBA-TO-JOBD as an OUT Condition
In JOB B add #-JOBB-TO-JOBD as an OUT Condition
In JOB C add #-JOBC-TO-JOBD as an OUT Condition

This should then work

Thanks

User avatar
sukie
Nouveau
Nouveau
Posts: 11
Joined: 15 Nov 2011 12:00

Post by sukie » 11 Jan 2012 5:47

Chrisw,

Oh how I wish your solution worked, life would be so simple!
I have set up a test schedule using your proposed solution and it does not work for me.

I believe that the only way your solution would work is if you either

1. have an 'If Scheduled' type job running daily which would post the 'missing' conditions for JOBD on the days when JOBB and JOBC are not scheduled, or

2. you are using smart tables which have the 'If Scheduled' type functionality via the 'Adjust Conditions' option

So I believe that you are either using smart tables or you have a If Scheduled job running in the background that you don't know about. If you're not utilising either then I'd be very interested to hear more from you about how this all works.

User avatar
yohcha
Nouveau
Nouveau
Posts: 3
Joined: 02 Jan 2012 12:00

Post by yohcha » 13 Jan 2012 12:07

Thank you all for your help.

Chris, I tried your solution. I wasn't aware about the maybe condition (there is no mention in the documentation of Control-M).
But your solution works partially because it works like a "OR" condition.
For example, if JOB A and JOB C are ordered, once one finishes then JOB D start and this is not the result I want.

Otherwise, and because all my jobs are in the same Smart Table, I set up the option "Adjust Condition" to Yes in the Smart Table and this solution works in all cases for me.

Thank you all again

User avatar
grueben
Nouveau
Nouveau
Posts: 4
Joined: 16 Nov 2011 12:00

Post by grueben » 13 Jan 2012 12:27

Do B & C need to run before D on a Sunday?

Seems to me you need to use 'or' conditions and set relationship manually.

User avatar
ArchanaSelvaraj
Nouveau
Nouveau
Posts: 1
Joined: 29 Dec 2010 12:00

Post by ArchanaSelvaraj » 24 Jan 2012 7:33

Job A(Mon-Sun) out condition Adone(+)
Job B(Sun) out condition Bdone(+)
Job C(Sun) out condition Cdone(+)

Job D(M-Sat) in condition(Adone)
Job D(Sun) in condition(Adone (and) Bdone (and) Cdone)

For job D alone 2 instance have to be created so that mon-sat A alone will be predecessor on Sunday alone A,B& C will be predecessor for the job.

Please do a test run revert me.

Regards,
Archana

User avatar
Zakeer
Nouveau
Nouveau
Posts: 43
Joined: 26 Feb 2007 12:00

Post by Zakeer » 31 Jan 2012 11:45

try Group Scheduling or make use of dummy jobs.

Post Reply