# Reliability of scheduled API Workflows

**URL:** <https://forum.bubble.io/t/reliability-of-scheduled-api-workflows/50722>\
**Category:** APIs\
**Created:** [February 27, 2019, 10:02pm UTC](https://forum.bubble.io/t/reliability-of-scheduled-api-workflows/50722 "2019-02-27T22:02:46Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexsstockton](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@alexsstockton](https://forum.bubble.io/u/alexsstockton)\
**Post date:** [February 27, 2019, 10:02pm UTC](https://forum.bubble.io/t/reliability-of-scheduled-api-workflows/50722/1 "2019-02-27T22:02:46Z")

</div>

I have a series of API Workflows that call other API Workflows in order to create a unique copy of a thing and all its sub-fields. (Since the default list copy function does not do this). Most of the time it runs great, but sometimes something goes wrong and the resulting copy is not perfect. What might be the cause of this, can we not count on server side workflows to run perfectly every time?

---

<div class="post-metadata">

**Author:** ![Kfawcett](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/kfawcett/32/38097_2.png) [@Kfawcett](https://forum.bubble.io/u/Kfawcett)\
**Post date:** [February 27, 2019, 10:33pm UTC](https://forum.bubble.io/t/reliability-of-scheduled-api-workflows/50722/2 "2019-02-27T22:33:16Z")

</div>

Do you see App too busy in your logs? That’s what I’ve seen in the past and means you need to upgrade to a larger plan.

---

<div class="post-metadata">

**Author:** ![alexsstockton](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@alexsstockton](https://forum.bubble.io/u/alexsstockton)\
**Post date:** [February 27, 2019, 11:34pm UTC](https://forum.bubble.io/t/reliability-of-scheduled-api-workflows/50722/3 "2019-02-27T23:34:08Z")

</div>

Just went through my server logs, didn’t find any errors or any indication of app being too busy.

---

<div class="post-metadata">

**Author:** ![JohnMark](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/johnmark/32/42431_2.png) [@JohnMark](https://forum.bubble.io/u/JohnMark)\
**Post date:** [February 28, 2019, 12:32am UTC](https://forum.bubble.io/t/reliability-of-scheduled-api-workflows/50722/4 "2019-02-28T00:32:31Z")

</div>

API workflows are asynchronous, it mean (you probably know) that if you run many workflows on same data, then eventually, you will observed that syndrome happening. You must find the way to not call the same data.

---

<div class="post-metadata">

**Author:** ![alexsstockton](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@alexsstockton](https://forum.bubble.io/u/alexsstockton)\
**Post date:** [February 28, 2019, 12:36am UTC](https://forum.bubble.io/t/reliability-of-scheduled-api-workflows/50722/5 "2019-02-28T00:36:09Z")

</div>

I want to make sure I understand what you’re saying. Basically the issue is that I have multiple calls on the same data, causing an error? and that I need to find a way to make sure it happens in sequence?

---

<div class="post-metadata">

**Author:** ![JohnMark](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/johnmark/32/42431_2.png) [@JohnMark](https://forum.bubble.io/u/JohnMark)\
**Post date:** [February 28, 2019, 12:42am UTC](https://forum.bubble.io/t/reliability-of-scheduled-api-workflows/50722/6 "2019-02-28T00:42:56Z")

</div>

It’s not causing any error, it’s simply not able to wrote data, but continue the process. In sequence will be best, until you found the guilty one.

---

<div class="post-metadata">

**Author:** ![alexsstockton](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@alexsstockton](https://forum.bubble.io/u/alexsstockton)\
**Post date:** [February 28, 2019, 12:45am UTC](https://forum.bubble.io/t/reliability-of-scheduled-api-workflows/50722/7 "2019-02-28T00:45:57Z")

</div>

This seems like it may be a pretty tough issue to solve, any tips? Appreciate the feedback already, thanks!

---

<div class="post-metadata">

**Author:** ![Kfawcett](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/kfawcett/32/38097_2.png) [@Kfawcett](https://forum.bubble.io/u/Kfawcett)\
**Post date:** [February 28, 2019, 12:53am UTC](https://forum.bubble.io/t/reliability-of-scheduled-api-workflows/50722/8 "2019-02-28T00:53:32Z")

</div>

It may help us if you can post screenshots of your workflow.

---

<div class="post-metadata">

**Author:** ![alexsstockton](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@alexsstockton](https://forum.bubble.io/u/alexsstockton)\
**Post date:** [February 28, 2019, 1:05am UTC](https://forum.bubble.io/t/reliability-of-scheduled-api-workflows/50722/9 "2019-02-28T01:05:28Z")

</div>

These are the 3 API Workflows, essentially I’m recursively constructing a copy of a thing and all its sub things.

The object i’m reconstructing looks like this  
—Workout Template  
-----List Of Workout Groups  
-------List of Set Groups  
-----------List of set objects

I provide the First API call with the reference object to copy, then it copies the first sub list, before calling another API workflow for the next sub-list of things. This continues until it gets to the “bottom”. Hopefully that makes sense.

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/a/a/aa9f6c2bddcb2a9980f96d04afa3186fa8a737e6.png)

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/7/a/7ad4c75ba99f633843567565071c120a3774c423.png)

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/c/3/c3a511b53898bfc691d4c6f14bd3383099c71b2e.png)

---

<div class="post-metadata">

**Author:** ![Kfawcett](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/kfawcett/32/38097_2.png) [@Kfawcett](https://forum.bubble.io/u/Kfawcett)\
**Post date:** [February 28, 2019, 1:16am UTC](https://forum.bubble.io/t/reliability-of-scheduled-api-workflows/50722/10 "2019-02-28T01:16:47Z")

</div>

Make sure you enter a number like “10” or greater into the Interval fields that are showing in red. This will slow down the workflow. I still think you are experiencing Bubble terminating workflows if it uses more CPU than your plan allows.

You could also put a condition in the “Only When” field on your Step 3s to “Result of Step 1 is not empty”.

If you go to the Logs page. Does the “Duration where the app hit it maximum… last 24 hours” have anything other than 0?

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/d/0/d088b7d74ea78f4384666538e6e43965923b0ad8.png)

---

<div class="post-metadata">

**Author:** ![alexsstockton](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@alexsstockton](https://forum.bubble.io/u/alexsstockton)\
**Post date:** [February 28, 2019, 1:19am UTC](https://forum.bubble.io/t/reliability-of-scheduled-api-workflows/50722/11 "2019-02-28T01:19:07Z")

</div>

Going to try implementing that, and no, it shows 0

---

<div class="post-metadata">

**Author:** ![alexsstockton](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@alexsstockton](https://forum.bubble.io/u/alexsstockton)\
**Post date:** [February 28, 2019, 1:35am UTC](https://forum.bubble.io/t/reliability-of-scheduled-api-workflows/50722/12 "2019-02-28T01:35:51Z")

</div>

using “only when” does not fix it, and using a 10 second interval is much to long. I recreate this object and then the user uses it. A small pause is fine, but that would take a very long time.

---

<div class="post-metadata">

**Author:** ![keith](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/keith/32/56020_2.png) [@keith](https://forum.bubble.io/u/keith)\
**Post date:** [February 28, 2019, 1:49am UTC](https://forum.bubble.io/t/reliability-of-scheduled-api-workflows/50722/13 "2019-02-28T01:49:53Z")

</div>

Do it in the page then. JavaScript. Toolbox… you’re just gonna have to learn them.

(Don’t worry, bubble is still the bomb when you do this. Sometimes you just have to do things the old fashioned way.)

---

<div class="post-metadata">

**Author:** ![alexsstockton](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@alexsstockton](https://forum.bubble.io/u/alexsstockton)\
**Post date:** [February 28, 2019, 1:51am UTC](https://forum.bubble.io/t/reliability-of-scheduled-api-workflows/50722/14 "2019-02-28T01:51:24Z")

</div>

Got it, So I can write these API actions via java script and implement them that way?

---

<div class="post-metadata">

**Author:** ![keith](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/keith/32/56020_2.png) [@keith](https://forum.bubble.io/u/keith)\
**Post date:** [February 28, 2019, 1:53am UTC](https://forum.bubble.io/t/reliability-of-scheduled-api-workflows/50722/15 "2019-02-28T01:53:13Z")

</div>

OR… it could be that you’re thinking about it the wrong way. Sounds like you’re just trying to build up a new complex object from component parts? Can’t you just take the handles to the sub objects you already have, copy those, copy the next level up, etc.? Until you have the completed Thing?

Throwing it to the server will never be faster than doing those operations in the page.

---

<div class="post-metadata">

**Author:** ![alexsstockton](https://avatars.discourse-cdn.com/v4/letter/a/aca169/32.png) [@alexsstockton](https://forum.bubble.io/u/alexsstockton)\
**Post date:** [February 28, 2019, 1:55am UTC](https://forum.bubble.io/t/reliability-of-scheduled-api-workflows/50722/16 "2019-02-28T01:55:26Z")

</div>

> [@keith](#):
>
> inking about it the wrong way. Sounds like you’re just trying to build up a new complex object from component parts? Can’t you just take the handles to the sub objects you already have, copy those, copy the next leve

Possibly, will give it some thought, thanks! The main benefit for me server-side was that if a user loses connection, it wouldn’t result in am imperfect copy.
