2

I just create two automation to build a loop process in which I don't have to wait 1 hour as it has to be when the Automation is scheduled.

  • Automation A: One script activity that calls the Automation B
  • Automation B: One wait activity of 20 minutes and one script activity that calls the Automation A.

The problem is that suddenly the automation B start being skipped, why? Is there any other way to do it?

2
  • Has it worked before and only now is it starting to skip? Do any errors appear on the Activity tab for Automation B?
    – Mark G
    Commented Mar 26, 2019 at 11:35
  • No errors. it works nice but after a few runs it start skipping the automation and I have to run the automation manually to start running again
    – fromero
    Commented Mar 26, 2019 at 11:37

1 Answer 1

5

Usually what I do in these types of automations is include a second 'failsafe' script activity after the one used to initialize the next automation. I have found that depending on the activity in the account, a start automation API request in a constant loop can be 'lost in the nether' and although infrequent, can completely screw up your whole process.

So basically you would have:

Your Actual Actions | Script1 | Wait 2 minute | Script2

  • Script1 is your current 'start next automation' script
  • Wait period is to ensure the request is complete or any 'starting weirdness' is gone. I put 2 mins, as that was acceptable to my Use Case, but can be 1 minute or even to be extra safe 3-5 mins.
  • Script2 is a script to check current status and if it is not 'Running' then to push start request again.

This failsafe has reduced the amount of times that the automation loop has grinded to a halt to once or twice every year.

If you really want to keep on top of it, you can also set up a third scheduled automation that retrieves the status of the 2 other automations and if neither one is 'Running' then to send an alert email for you to check it out. You could also have this automatically start it again, but I tend to like the manual check to verify it and will be helpful if there is an error as well.

4
  • And is the first automation (the one with two scripts) scheduled or it is not necessary?
    – fromero
    Commented Mar 26, 2019 at 14:17
  • 1
    both automations should have the 2 scripts as they call each other. You shouldn't need to schedule them as once you manually start it, they will call each other continuously. Only the 3rd error check automation would need to be a set schedule Commented Mar 26, 2019 at 14:21
  • Okay it is clear now, could you please share the code for the Script2 so I can start testing it? Thanks
    – fromero
    Commented Mar 26, 2019 at 15:14
  • 1
    It is essentially the same as Script1 just with a change in the conditional logic Commented Mar 26, 2019 at 15:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .