That is tough, as you want to send a different message depending on the circumstance, and both need to be sent on failure. As you, and many other Control-M users know, there are no nested IFs in the Steps panel. What I would do is take the alerting out of the job itself and instead shout to a script if the job fails (use a shout destination of type P). This script will then handle the alerts. The shout to the script must pass to the program the RUNCOUNT system parameter (and any other parameters you need for the message). The program will then check the value of this and if it is 1, it will send a message saying that the job will be rerun. If it is 2, the message will say that the job failed the second time and needs investigation. The messages can be sent using the ctmshout utility.
that's seems to be a good way.
Have you got an example of this kind of script (call by shout and check RunCount before send a different alarm by mail) ?
Thanks a lot if you can.