Receive feed only once every 15 minutes

avinashcherukuri
Hello,

I am using the following code to run some functions once every 15 minutes. In most cases it works fine and receives feed only once, however in some instances it runs twice at the 15th minute and the 16th minute causing disruptions to my strategy. Is there a way we can restrict it to run only once?
if (datetime.datetime.now().time().minute % 15 == 0 and datetime.datetime.now().time().second%60 ==0):
run_fun()
Sign In or Register to comment.