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
Email alert on third failure
- vamsikumar
- Nouveau
- Posts: 10
- Joined: 23 Aug 2013 12:00
- Location: Banglore
- vamsikumar
- Nouveau
- Posts: 10
- Joined: 23 Aug 2013 12:00
- Location: Banglore
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.
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.
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
and the job like this:
so, in your case it should work like this:
get your error message: eXAMPLEerr
you can add [DO] NOTOK on each failure or the last one, that's on your behalf
regards,
i'm using a solaris enviroment so i have created a simple script
Code: Select all
user@server # cat ./prueba
#!/bin/bash
echo TERMINOMAL
Code: Select all
[ON] Statement = *
Code= RUNCOUNT=3,TERMINOMAL
[DO] NOTOK
get your error message: eXAMPLEerr
Code: Select all
[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,
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.