import datetime as dt
def print_text():
print("Hi!")
next day = dt.datetime.now() + dt.timedelta(days=1)
dateString = next day.strftime('%d-%m-%Y') + "12-00-00"
in the mining = next day.strptime(dateString,'%d-%m-%Y %H-%M-%S')
delay = (in the mining - dt.datetime.now()).total_seconds()
Timer(delay, print_text, ()).start()
Find more questions by tags Django
Just where to place it? - karlee6 commented on June 8th 19 at 17:17