Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
TaMahdi
Contributor III
Contributor III

Auto-run to the automation if failed

Hello,

Is there a way to re-run the automation if failed after certain period of time (15-30 minutes).

 

Thanks, 

Labels (3)
1 Reply
J_Lindberg
Support
Support

Hello,

Yes, this is possible but not from the failed automation itself. You need to set up an additional automation that is configured to run on a schedule to monitor the automation you want re-run if it should fail.

You must also decide if the re-run should 1) retry the failed automation run using the same, if any, input, or 2) initiate an entirely new run of the automation. The solution would depend on what you want to achieve.

 

Retry Automation Run

Use the block “Retry Automation Run” to retry a specific run of the automation using the same, if any, inputs. This approach would be applicable if the automation that fails has the run mode set to Webhooks or Triggered. It is also possible to manually re-run these runs using the “retry” button in the automations run history.

J_Lindberg_21-1665151844579.png

 

Run Automation

Use the block “Run Automation” to initiate a new run of the automation. This approach would be applicable if the automation that fails has the run mode set to Scheduled and the inputs of the failed run wouldn’t be unique.

 

Re-run example

This is an example of how you can retry an automation run that has failed. The “Run Automation” block could be used instead of the “Retry Automation Run” block depending on the approach you want to implement.

  1. First use the “List My Automations” block to get all of your automations.
  2. Add the block “List Automation Runs” and apply a filter to only get the runs that have failed:
    J_Lindberg_14-1665151806405.png
  3. Use the “Transform List” block to create a list of failed runs, then add the two fields id and stopTime for this list. The first one should be set up such as this:
    J_Lindberg_15-1665151806423.png
    The second one should be set up such as this:J_Lindberg_16-1665151806430.png
    The values for stopTime must be transformed using the Date formula, so that it is possible to use this value for comparisons. The output format should be changed to U (Unix format):J_Lindberg_17-1665151806445.png
  4. To only get the most recent failed runs the list must be filtered using the “Filter List” block. Here you can set up a condition that controls how recent failed runs you would like to retry:J_Lindberg_18-1665151806455.png
    In the formula for Date you can configure how recent runs you would like to retry. In this case failed runs within 30 minutes would be retried. The output format would have to be in Unix here as well:
    J_Lindberg_19-1665151806466.png
  5. The last step would be to include the “Retry Automation Run”, or the “Run Automation” block depending on what you are trying to achieve. This is an example of what "Retry Automation Run" should look like:
    J_Lindberg_22-1665152880193.png

 

This is an overview of what the example automation looks like:

J_Lindberg_23-1665152956885.png