Hello all. I have a script and I want to code it so that it becomes active every hour on the half hour. This is the code I have so far.
from ConfigParser import *
import emailModule
from datetime import datetime
import time
configuration = ConfigParser()
configuration.read('Email.conf')
email = emailModule.emailModule(configuration)
while(True):
if (datetime.now().minute > 28 and datetime.now().minute < 32):
email.emailWeather()
time.sleep(3000)
I am just wondering is there a better way of doing this in python? IE a more efficient way or more reliable way of doing things.