# Rescheduling API Workflow

**URL:** <https://forum.bubble.io/t/rescheduling-api-workflow/140572>\
**Category:** Bugs\
**Created:** [March 10, 2021, 8:34pm UTC](https://forum.bubble.io/t/rescheduling-api-workflow/140572 "2021-03-10T20:34:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ferhatg](https://avatars.discourse-cdn.com/v4/letter/f/9f8e36/32.png) [@ferhatg](https://forum.bubble.io/u/ferhatg)\
**Post date:** [March 10, 2021, 8:34pm UTC](https://forum.bubble.io/t/rescheduling-api-workflow/140572/1 "2021-03-10T20:34:48Z")

</div>

Hello all,

I have been trying to understand what is really happening when I try to reschedule an API workflow and save API Workflow’s id to the same object. Maybe someone can help me with this.

We are running auctions in our application and we schedule an API workflow to end the auction. So we simply schedule an API workflow to change auction object’s field called accepts\_bid from yes to no. We also record scheduled API workflow ID to the auction object’s field called API\_ID.

The reason we record scheduled API workflow ID it to cancel it when needed. One of the use case we have is when we want to extend the auction end time. We extend auctions 5 more minutes when there is new bid placed within last 5 minutes of auction.

For example; auction is scheduled to end at 10:00 am and user place a bid at 9:57. In this case, we extend the auction 5 more minutes - 9:57 + 5 = 10:02  
We cancel previous scheduled workflow and schedule a new one in the same workflow.

So workflow goes:  
1 - Cancel previously scheduled API Workflow  
1 - Schedule a new API Workflow  
2 - Make changes to auction and save new API Workflow ID

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

1 - Cancel scheduled API - auction’s API\_ID

**note that we use auction’s API\_ID field**  
 ![image](https://us1.discourse-cdn.com/bubble/original/3X/c/e/ce4c854de09ba064edf728bb5485dea0d110048b.png)

2- Schedule API Workflow-auction-ends

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

3- Make changes to auction

**note that we use the same auction’s API\_ID field**  
 ![image](https://us1.discourse-cdn.com/bubble/original/3X/a/7/a72e6a63658e9773fa73f61bfbb9f06918a76a0d.png)

This workflow is working for us %95 of the time, but sometimes it doesnt cancel the scheduled api (1st) for some reason. This usually happens when we receive too many bids one another and this workflow getting called multiple times in couple of seconds.

Any idea how I should approach this? There is some asynchronous action going that I dont understand.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [March 24, 2021, 8:35pm UTC](https://forum.bubble.io/t/rescheduling-api-workflow/140572/2 "2021-03-24T20:35:20Z")

</div>

Closed on March 24, 2021, 8:35pm UTC

This topic was automatically closed after 14 days. New replies are no longer allowed.
