There are a lot of ways you could do this. You could just open up your browser to that location. You could try @jimtodd's answer and then cURL the endpoint from another terminal window.
To do it in the code, which I guess is what you want, Flask offers you some helper methods. For example there is: http://flask.pocoo.org/docs/1.0/api/#flask.Flask.before_first_request
You can use it like this:
def foo():
pass
app.before_first_request(foo)
In the case where you want to run a script strictly on run, not just before the first request, this solution is good: Run code after flask application has started -- I guess you would use this for cold-start problems as well.