I have a scenario where I have to retry run the failed autosys
command job after 10 minutes. I have to retry rerunning it only twice. I cannot use n_retry
attribute here because I need to wait for 10 minutes for every failure of the command box.
What I have implemented is, after the command box I want to create, another cmd job that calls a batch script that sleeps for 10 minutes and this has to be done only twice, like first time when it fails it will call the sleep for 10 minutes and then again call the cmd job if it fails again, call sleep for 10 more minutes and then call the cmd job if it fails for a second time then come out of the loop.
Can there be a batch script that can set a counter as 2 and call sleep?