Make a function call itself after set amount of time

Valentino Volonghi aka Dialtone dialtone#NOSPAM#.despammed at
Sat Jan 17 00:18:26 CET 2004

Bart Nessux <bart_nessux at> writes:

> How do I make a function call itself every 24 hours. Also, is there a
> way to start the program automatically w/o depending on the OS
> functions like 'Task Scheduler' or 'Start Up Items'... this is on
> Windows 2k and xp. Below is an example of what I'm trying to do.

Never seen twisted? Here is a little tip:

from twisted.internet import reactor
def doSomething(mystring):
    print mystring
    reactor.callLater(5, doSomething, mystring)

Twisted also has a lot of already implemented protocols for almost
everything related to net so maybe you can think of a new version of
your app using twisted's protocols.

Valentino Volonghi, Regia SpA, Milan
Linux User #310274, Gentoo Proud User

More information about the Python-list mailing list