Flow and Azure Runbooks - retry the run job action
Hello,
I have a flow that in the actions it runs an azure runbook. Sometimes the runbook fails, and currently im reading the status of the job, whenever its not Completed -> im sending an email to list of recipients and flow needs to be restarted
Reason for the failure of the automation job can be different, sometimes its just a replication issue or its simply a transient error that gets resolved on its own ( e.g I manually re-run the job with same parameter 5 minutes later and it works as expected)
As I understand, I can just keep adding the same steps to the if condition ( if status not Completed -> wait 5-10minutes, run same action again, and again and again) , but there's a lot of steps and there's multiple runbooks in that flow that need to be run, therefore I am wondering if there's a better way. As in, run the runbook, if it fails, I'd configure say 3 loops. As in, if it fails, I'd like it to loop back to running the runbook part,3 times with configuered delay and only then to stop the flow. Right now its set as completed successful if any of the runbooks fail because I am checking for the status of the output of the job, and if its not Completed I am sending notification, but not sure if theres any way I could use a 'fail' status to direct it into a loop ?
Regards,
Boleslaw.