Shutting down dash app

Hi there!

Is it possible to have a link or button in the dash application that shuts down the app, i.e. it stops running?
In other words, what python function can cleanly shut down the app?


Here’s an example with flask:

Note that in that snippet “app” is referring to the instance of flask. You can access that instance in dash with app.server (where app in this case is the instance of dash: app = dash.Dash())

1 Like

Thanks @chriddyp. As an extension to this question (forgive me if its a noob question!), is there a way that the Dash app can be made to gracefully shutdown between a specified time in the day? So for example, If I wanted to refresh the files that I needed to process at 1am, is there a mechanism to ask Flask / Dash server to shutdown between 1 and 2 am everyday?