Hello All,
I want write a daemon in python but this daemon have to read a conf file like
<server>
<name>nagios</name>
<check>process1;process2;process3
<day>01234
<hour>08:00-18:00
<delay>360</delay>
</hour>
<hour>18:00-23:59;00:00-07:59 <intervalle>3600</intervalle>
</hour>
</day>
<check>
</serveur>
And it has to communicate with an other daemon (via socket) all monday -> friday all 5 mn betwwen 8 and 18 and one per hour otherwise (accordinf to the example conf file)
I have absolutely no idea how I can do that in python.
Maybe an infinite loop.
I read the conf file but I have to know the time, and, mostly, to know how I can run one check per 5 mn by example because I can't use crontab ...
Does someone have an idea please ?
I want write a daemon in python but this daemon have to read a conf file like
<server>
<name>nagios</name>
<check>process1;process2;process3
<day>01234
<hour>08:00-18:00
<delay>360</delay>
</hour>
<hour>18:00-23:59;00:00-07:59 <intervalle>3600</intervalle>
</hour>
</day>
<check>
</serveur>
And it has to communicate with an other daemon (via socket) all monday -> friday all 5 mn betwwen 8 and 18 and one per hour otherwise (accordinf to the example conf file)
I have absolutely no idea how I can do that in python.
Maybe an infinite loop.
I read the conf file but I have to know the time, and, mostly, to know how I can run one check per 5 mn by example because I can't use crontab ...
Does someone have an idea please ?