# run infinitly
while(True):
done = False;
while(not done):
#Do Stuff
#Main Program
#stopping condition of inner while loop
if datetime.datetime.n
There are various ways to do it, but keeping close to your original design, I'd code the inner loop as:
while(not done):
if datetime.datetime.now().minute % 10 == 0:
done = True
else:
time.sleep(60-datetime.datetime.now().second)
(I'm assuming what you were trying to do with that second if
was sleep until the next minute when you weren't ready to exit the loop.)