We have one unix job which always get failed due to following error
unable to execute os command
and just after retrying in second or third run it successfully executed.
So now I want retry logic up to 3 times for the below piece of code, please give example for below code.
If execution is successful in first run then it should come out of loop else it should continue retrying till 3 times. Then after it should come out of loop and process remaining code.
sqlplus -s / <<EOF
set serveroutput on size 999999
set feed off
set term off
spool ../logs/$PROGRAM.log3
execute $PROGRAM;
EOF