Re: Activate a daemon several times a day

2006-07-06 Thread Simon Forman
Yves Glodt wrote: > while True: > if now(hours) in runat: > act() > sleep(60) > sleep(10) > Note that, if "now(hours)" *is* in runat, this loop will sleep 70 seconds, not 60. It probably doesn't matter. -- http://mail.python.org/mailman/listinfo/python

Re: Activate a daemon several times a day

2006-07-06 Thread Simon Forman
Yves Glodt wrote: > 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 th

Re: Activate a daemon several times a day

2006-07-06 Thread Amit Khemka
did you considered using signals ?! I guess that could well serve the purpose .. more of signals: http://docs.python.org/lib/module-signal.html cheers, amit. On 7/6/06, Yves Glodt <[EMAIL PROTECTED]> wrote: > Hi, > > I have a daemon which runs permanently, and I want it to do a special > operat

Activate a daemon several times a day

2006-07-06 Thread Yves Glodt
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: