# App Callback run at specific time of the day

**URL:** <https://community.plotly.com/t/app-callback-run-at-specific-time-of-the-day/30787>\
**Category:** Dash Python\
**Created:** [November 1, 2019, 7:50pm UTC](https://community.plotly.com/t/app-callback-run-at-specific-time-of-the-day/30787 "2019-11-01T19:50:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![frobro989](https://avatars.discourse-cdn.com/v4/letter/f/f05b48/32.png) [@frobro989](https://community.plotly.com/u/frobro989)\
**Post date:** [November 1, 2019, 7:50pm UTC](https://community.plotly.com/t/app-callback-run-at-specific-time-of-the-day/30787/1 "2019-11-01T19:50:44Z")

</div>

I have an app that has a live connection to a database throughout the day. If the connection lasts until later at night, the connection will get killed and my app is still running with a closed connection with no way of starting it back up.

Can you program an app callback to excuse at a certain time of the day? That way I can create a function to open the connection at time t and close the connection at time T.

---

<div class="post-metadata">

**Author:** ![tcbegley](https://avatars.discourse-cdn.com/v4/letter/t/46a35a/32.png) [@tcbegley](https://community.plotly.com/u/tcbegley)\
**Post date:** [November 1, 2019, 11:01pm UTC](https://community.plotly.com/t/app-callback-run-at-specific-time-of-the-day/30787/2 "2019-11-01T23:01:40Z")

</div>

I don’t believe this is possible, but you could instead check out the [updates on page load](https://dash.plot.ly/live-updates) section of the docs and refresh your database connection each time a user refreshes the page? Presumably all you care about is that when the user visits the page, the connection is available?
