Activate a daemon several times a day

Amit Khemka khemkaamit at gmail.com
Thu Jul 6 12:13:34 EDT 2006


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 <y.glodt at sitasoftware.lu> 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 this pseudocode:
>
> while True:
>         if now(hours) in runat:
>                 act()
>                 sleep(60)
>         sleep(10)
>
>
> Please enlighten me!
>
> Best regards,
> Yves
> --
> http://mail.python.org/mailman/listinfo/python-list
>


-- 
----
Amit Khemka -- onyomo.com
Home Page: www.cse.iitd.ernet.in/~csd00377
Endless the world's turn, endless the sun's Spinning, Endless the quest;
I turn again, back to my own beginning, And here, find rest.



More information about the Python-list mailing list