Windows 7/vista Process Management - How To Start An External Program After Long Idle Time?
This is a follow-up to that question. Basically, i have a python script which should start another program (.exe) via a timer after some 2-6 hours. Everything works fine as long as
Solution 1:
After taking account the problem stated in Here, I think a viable alternative would be to use many short pauses instead of a long pause, so the program is always active, but may result in higher memory usage.
def wait(sec,sleeptime = 0):
import time
endsecs = time.time() + sec
while True:
if endsecs <= time.time():
return None
if sleeptime != 0:
time.sleep(sleeptime)
Just a guess, nothing certain, no time to verify.
Post a Comment for "Windows 7/vista Process Management - How To Start An External Program After Long Idle Time?"