Algunas sugerencias:
Haz intentando crear un tarea programada usando cron?
Puedes usar
watchdog para usar ejecutar comandos cuando exista un cambio en un archivo.
Con respecto a tu script original, has intentado meterlo en un ciclo y correr este proceso demonizado?
Código Python:
Ver originaldelay = 360
while True:
tempout = open("/home/pi/projects/tempo1.txt")
tempout1 = tempout.read(8)
tempout1 =float(tempout1)* 1.8 + 32
tempout.close()
#print tempout
# upload data to mi_web
try:
conn = httplib.HTTPConnection("miweb.com")
path = "/blablalba/blabalba?ID=xxxxxxxxx&PASSWORD=clave_pass&dateutc=" + str(datetime.utcnow().isoformat()) + "&humidity=" + str(humidity) + "&tempf=" + str(tempout1) + "&baromin=" + str(press1) + "&softwaretype=status=updateraw"
conn.request("GET", path)
res = conn.getresponse()
print path
# checks whether there was a successful connection (HTTP code 200 and content of page contains "success")
if ((int(res.status) == 200) & ("success" in res.read())):
print "%s - Successful Upload\nTemp: %.1f F, Humidity: %.1f %%\nNext upload in %i seconds\n" % (str(datetime.now()), temp, humidity, delay)
else:
print "%s -- Upload not successful, check username, password, and formating.. Will try again in %i seconds" % (str(datetime.now()), delay)
except IOError as e: #in case of any kind of socket error
print "{0} -- I/O error({1}): {2} will try again in {3} seconds".format(datetime.now(), e.errno, e.strerror, delay)
# Wait before re-uploading data
time.sleep(delay)