# Start and Stop in API

**URL:** <https://discuss.saleae.com/t/start-and-stop-in-api/3201>\
**Category:** Uncategorized\
**Created:** [January 2, 2025, 8:46am UTC](https://discuss.saleae.com/t/start-and-stop-in-api/3201 "2025-01-02T08:46:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![haia.amsha98](https://avatars.discourse-cdn.com/v4/letter/h/eb8c5e/32.png) [@haia.amsha98](https://discuss.saleae.com/u/haia.amsha98)\
**Post date:** [January 2, 2025, 8:46am UTC](https://discuss.saleae.com/t/start-and-stop-in-api/3201/1 "2025-01-02T08:46:46Z")

</div>

Hi ,

I’m currently using the Logic 2 API to start and stop captures. However, I’ve noticed that both methods experience significant delays, which occasionally results in data loss. While adding delays can fix the issue, it is critical for the code we are running and not an ideal solution.

Is there an alternative way to handle this issue to without adding additional delays?

Thanks

---

<div class="post-metadata">

**Author:** ![timreyes](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.saleae.com/timreyes/32/108_2.png) [@timreyes](https://discuss.saleae.com/u/timreyes)\
**Post date:** [January 4, 2025, 12:44am UTC](https://discuss.saleae.com/t/start-and-stop-in-api/3201/2 "2025-01-04T00:44:50Z")

</div>

@haia.amsha98 Sorry for the trouble with that. Can you share more information as to the amount of delays you are seeing?

Unfortunately, delays between captures will be inevitable when using our Automation API, but in case you are saving captures in between stop/start cycles, we provide a sample script at the bottom of the support article below which allows you to export, save, and close captures in the background while the next capture is running.

> **[Automating Long Overnight Captures | Saleae Support](https://support.saleae.com/faq/technical-faq/automate-long-captures)**
