Activate a daemon several times a day

Yves Glodt y.glodt at sitasoftware.lu
Thu Jul 6 05:22:38 EDT 2006


Hi,

I have a daemon which runs permanently, and I want it to do a special 
operation at some specifiy times every day, consider this configfile 
extract:

[general]
runat=10:00,12:00


What would be the easiest and most pythonic way to do this?
Something like this pseudocode:

while True:
	if now(hours) in runat:
		act()
		sleep(60)
	sleep(10)


Please enlighten me!

Best regards,
Yves



More information about the Python-list mailing list