Running a python code periodically

Robert.Spilleboudt robert.spilleboudt.no.sp.am at skynet.be
Thu Apr 10 15:52:19 EDT 2008


paul wrote:
> Maryam Saeedi schrieb:
>> Hi,
>>
>> I was wondering if you know how can I run a python code once every five
>> minutes for a period of time either using python or some other program 
>> like
>> a bash script.
> 
> See the sched module in the standard library or here:
> http://pypi.python.org/simple/Recur/
> 
> cheers
>  Paul
> 
In a Python loop, use time.sleep(300) to wait 300 seconds.
If you use Tkinter, there is another method to call periodically a function.
Robert



More information about the Python-list mailing list