It is currently 20 Nov 2018 12:24


Post new topic  Reply to topic  [ 9 posts ] 
Author Message
PostPosted: 17 Mar 2014 8:57 
Offline
Nouveau
Nouveau
User avatar

Joined: 23 Aug 2013 12:00
Posts: 10
Location: Banglore
Hello All,

i have one requirement. kindly some one please help.

we have one job which is scheduled to run daily.

If the job failed for 1st time, it should rerun.
Again for 2nd time fails, again it should rerun.

If the job third time fails, then, need an email to group of people.

Kindly advise me how can i fulfill this requirement.

Regards and Thanks in Advance!!
Vamsi Kumar


Top
   
 Post subject:
PostPosted: 17 Mar 2014 11:40 
Offline
Nouveau
Nouveau
User avatar

Joined: 20 Jan 2006 12:00
Posts: 30
This requirement is a standard feature of Control-M V8.


Top
   
 Post subject:
PostPosted: 17 Mar 2014 12:59 
Offline
Nouveau
Nouveau
User avatar

Joined: 18 Jan 2014 12:00
Posts: 27
I think only the option with version 7 is. You set the alerts for all the failures and disregard first two :)


Top
   
 Post subject:
PostPosted: 17 Mar 2014 3:56 
Offline
Nouveau
Nouveau
User avatar

Joined: 04 Feb 2008 12:00
Posts: 61
Location: Cleveland, OH
Use Steps Panel: ON Statement: *
Code: RUNCOUNT=3
DO Mail
Also change Maxreruns = 2 on the Execution Panel if you don't want it to keep rerunning past this point.


Top
   
 Post subject:
PostPosted: 18 Mar 2014 7:35 
Offline
Nouveau
Nouveau
User avatar

Joined: 23 Aug 2013 12:00
Posts: 10
Location: Banglore
Hello,

In this case, we will get an email even the 3rd is successful. we need if 3rd run failed, then only we need email.

If 3rd run is success, no email or any other actions required.

Thanks in advance!!


Top
   
 Post subject:
PostPosted: 18 Mar 2014 7:52 
Offline
Nouveau
Nouveau
User avatar

Joined: 04 Feb 2008 12:00
Posts: 61
Location: Cleveland, OH
At least you know that it has failed at least twice. Add a note in the email to review the attached sysout to determine if it has failed on this run. You then need to change the parameter in DO MAIL Attach sysout = YES.

There is only so much you can do with the job definition. It is limited because the Steps panel does not allow ON (*) and ON (*). If it did you could code ON * COMPSTAT=1 AND ON * RUNCOUNT=3 DO.... but this is not possible. We have the production support team review the job/email on the third run to determine success. At some point you will need to do some manual intervention anyway if it keeps failing.


Top
   
 Post subject:
PostPosted: 27 Apr 2014 9:30 
Offline
Nouveau
Nouveau
User avatar

Joined: 12 Aug 2013 12:00
Posts: 9
Hi you can use this

ON * RUNCOUNT=3,NOTOK DO.... MAIL...


Top
   
 Post subject:
PostPosted: 27 Apr 2014 2:55 
Offline
Nouveau
Nouveau
User avatar

Joined: 19 Jun 2013 12:00
Posts: 36
Hello, I just tested what SKSKD said and it worked for me, you should try it.

i'm using a solaris enviroment so i have created a simple script


Code:

user@server # cat ./prueba
#!/bin/bash
echo TERMINOMAL



and the job like this:


Code:

[ON] Statement = *
        Code= RUNCOUNT=3,TERMINOMAL
[DO] NOTOK



so, in your case it should work like this:

get your error message: eXAMPLEerr

Code:

[ON] Statement = *
        Code= RUNCOUNT=1,eXAMPLEerr
[DO] Rerun

[ON] Statement = *
        Code= RUNCOUNT=2,eXAMPLEerr
[DO] Rerun

[ON] Statement = *
        Code= RUNCOUNT=3,eXAMPLEerr
[DO] Mail \\and fill the mail parameters





you can add [DO] NOTOK on each failure or the last one, that's on your behalf

regards,


Top
   
 Post subject:
PostPosted: 28 Apr 2014 3:30 
Offline
Nouveau
Nouveau
User avatar

Joined: 04 Feb 2008 12:00
Posts: 61
Location: Cleveland, OH
I have been coding for seven years and never knew you could use it that way. I even opened a ticket with BMC in the early years because there was a note in the manual stating you could perform an On * AND On * of which they determined was a misprint. I am the only Control-M person at my company and have no one to discuss issues with therefore the Forum. Thanks SKSKD and everyone that contributes to the Forum.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 9 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited
The site created by Franck YOT. Images, logo, content and trademarks about Control-M products are property of BMC Software.
All the comments are property of their posters. Images, logo, content and design are © copyright by Scheduler-Usage.com. All Rights Reserved