I have a python flask application that starts running with a variable called 'counter' initialized as 0. I want to increment this variable everyday at 00:30 AM and print it to the python console, without disturbing the application run.
I may want to pass that variable's current value at any point to the client.
counter = 0
if __name__ == "__main__":
port = 80
os.system("open http://localhost:{0}".format(port))
app.debug = False
app.run(host='0.0.0.0', port=port)
#### NEED CODE FOR HERE ####
#Trying out logic:
if (time == 00:30):
counter = counter+1
print counter
#### NEED CODE FOR HERE ####
Please provide working code in your answer.