cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Gwynbleid
Frequent Visitor

Flow and Azure Runbooks - retry the runbook

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. 

1 ACCEPTED SOLUTION

Accepted Solutions
v-alzhan-msft
Community Support
Community Support

Hi @Gwynbleid ,

 

You could take a try with the Do until, please refer to screenshot below to create the flow:

1.png2.png

Please let me know if your problem could be solved.

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-alzhan-msft
Community Support
Community Support

Hi @Gwynbleid ,

 

You could take a try with the Do until, please refer to screenshot below to create the flow:

1.png2.png

Please let me know if your problem could be solved.

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hi,

 

Many thanks, I will test and reply here with results but this looks very promising!

 

Regards.

Helpful resources

Announcements
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (40,523)