Delay Execution of Job B 30 minutes on completion of Job A.

Everything about Control-M Enterprise Manager Server installation or setup.
Post Reply
User avatar
Naval
Nouveau
Nouveau
Posts: 8
Joined: 11 Oct 2011 12:00
Location: Bangalore, India

Delay Execution of Job B 30 minutes on completion of Job A.

Post by Naval » 08 Dec 2012 12:31

Hi,

There are 2 jobs A and B.

Job B is dependent on completion of Job A.

But Job B should start only after 30 minutes of completion of Job A.

Any Suggestions.
Thanks,
Naval

User avatar
Winsome
Nouveau
Nouveau
Posts: 16
Joined: 06 Jul 2010 12:00
Location: Chennai
Contact:

Post by Winsome » 08 Dec 2012 5:35

I am not sure if this is the only way, but this might work.

Schedule a dummy job in between Job A and Job B, such that,

When Job A completes fine, it triggers the DUMMY job, and since its a dummy it would end OK, in the steps tab of the DUMMY job mention,

On Stmt* Code OK
Do Rerun

On Stmt * Code RUNCOUNT>1
Do Condition Name = TriggerjobB (or what ever the condition name you have in Job B's incondition)

In the Execution Tab of the DUMMY mention the RERUN counter as Rerun every 30 mins from jobs END.


How this would help i believe, is the Job A would trigger DUMMY when it completes fine and DUMMY would run immediately and complete fine, and then Do RERUN after 30 mins.
30 mins later the second run would start and complete fine, and since the RUNCOUNT would be 2 which is greater than 1, it will trigger the job B.

When it goes for the second run the 30 minute timer would have elapsed and so it would be fine for JobB to run then.


NOTE: I haven't tested this yet, but this is what popped up in my mind as soon as I read your question. I can think on this more if this solution doesn't work.
Thanks!Winsome

User avatar
mauriziog
Nouveau
Nouveau
Posts: 807
Joined: 08 Jun 2007 12:00
Location: Varese - Italy
Contact:

Post by mauriziog » 08 Dec 2012 11:02

You can use the PRECMD or POSTCMD.

You can at the end of the jobA, put in the set panel:
POSTCMD=sleep 180

Or you can put in the jobs B:
PRECMD=sleep 180.

So the second jobs starts only in the first is ended and the first thing it do is wait 30 seconds.

Regards
Last edited by mauriziog on 25 Jan 2013 11:24, edited 1 time in total.

User avatar
niras
Nouveau
Nouveau
Posts: 32
Joined: 26 Oct 2009 12:00

Post by niras » 25 Jan 2013 12:38

Does PRECMD and POSTCMD work with other then MEMNAME jobs(i.e in windwos,.bat,.exe and .cmd).

I have couple of FTP jobs,the dependent job(Job B) should only execute after 15 minutes of Job A completion.I tried using PRECMD and POSTCMS,but it doesn't seem to work

User avatar
mauriziog
Nouveau
Nouveau
Posts: 807
Joined: 08 Jun 2007 12:00
Location: Varese - Italy
Contact:

Post by mauriziog » 25 Jan 2013 11:42

If the agent run on windows machine, dose not exist "sleep" command, you shoud use the _sleep .
Is an utility provided with the controlM agent.

Regards

User avatar
niras
Nouveau
Nouveau
Posts: 32
Joined: 26 Oct 2009 12:00

Post by niras » 04 Feb 2013 10:18

Thank you.It is working.I was not getting the right syntax earlier.

[/img]

User avatar
sophiawhite
Nouveau
Nouveau
Posts: 1
Joined: 23 Feb 2013 12:00
Contact:

Post by sophiawhite » 23 Feb 2013 4:10

Well that is alright , just finished the A after compilation, start B. I don't think so there is no "Rocket Science".

IT Support London

User avatar
lucycandy
Nouveau
Nouveau
Posts: 3
Joined: 09 Apr 2013 12:00
Contact:

Post by lucycandy » 09 Apr 2013 11:20

Recently all gone well.









____________________________________
wow gold|diablo 3 gold|Defiance Scrip|GW2 Gold

Post Reply