# Large Data Batch Requests

**URL:** <https://forum.wixstudio.com/t/large-data-batch-requests/53288>\
**Category:** Ask the community\
**Tags:** api, question, code, wix\
**Created:** [October 25, 2023, 5:24pm UTC](https://forum.wixstudio.com/t/large-data-batch-requests/53288 "2023-10-25T17:24:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kojo\_Nyarko](https://avatars.discourse-cdn.com/v4/letter/k/ee7513/32.png) [@Kojo\_Nyarko](https://forum.wixstudio.com/u/Kojo_Nyarko)\
**Post date:** [October 25, 2023, 5:24pm UTC](https://forum.wixstudio.com/t/large-data-batch-requests/53288/1 "2023-10-25T17:24:24Z")

</div>

**Question:**  
[I have a wix site that needs to make an API call to an external system to get updates for a large dataset, over 5000 records. the code keeps timing out. What is the best solution to solve this problem?.]

**Product:**  
[Which editor or feature is your question most relevant to? e.g. Wix Editor.]

**What are you trying to achieve:**  
[Update records daily.]

**What have you already tried:**  
[Multiple batch runs that time out.]

**Additional information:**  
[Include any other pertinent details or information that might be helpful for people to know when trying to answer your question.]

---

<div class="post-metadata">

**Author:** ![thomasj](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/thomasj/32/30791_2.png) [@thomasj](https://forum.wixstudio.com/u/thomasj)\
**Post date:** [October 26, 2023, 7:38pm UTC](https://forum.wixstudio.com/t/large-data-batch-requests/53288/3 "2023-10-26T19:38:41Z")

</div>

This seems like a great use case for the [Job Scheduler](https://dev.wix.com/docs/develop-websites/articles/workspace-tools/developer-tools/recurring-jobs/scheduling-recurring-jobs). Using the Job Scheduler you can create a reoccurring job that calls a function which updates the records regularly.

An advantage of using a job is that your function can run for 5 minutes, which is longer than the standard timeout for backend functions.

For greater time efficiency, I recommend using [bulkUpdate()](https://www.wix.com/velo/reference/wix-data/bulkupdate) from the [Wix Data API](https://www.wix.com/velo/reference/wix-data/introduction) as it will allow you to update 1000 records in one function call versus using the standard [update()](https://www.wix.com/velo/reference/wix-data/update) for one record at a time.

---

<div class="post-metadata">

**Author:** ![Kojo\_Nyarko](https://avatars.discourse-cdn.com/v4/letter/k/ee7513/32.png) [@Kojo\_Nyarko](https://forum.wixstudio.com/u/Kojo_Nyarko)\
**Post date:** [November 1, 2023, 5:47am UTC](https://forum.wixstudio.com/t/large-data-batch-requests/53288/4 "2023-11-01T05:47:46Z")

</div>

Thank you, Thomas, great help. Do you by any chance have a sample code of how bulk data will work?
