On Fri, 29 Sep 2006, Francis Cianfrocca wrote:

>
> You say nothing about the coordination requirements of the external
> processes with the "watchdog" process. Is your requirement really just to
> ensure that four jobs are running at all times? If so, I would avoid using a
> long-running watchdog process, because you're making an assumption that it
> will never crash, catch a signal, etc. Why not run a cron job every five
> minutes or so that checks the running processes (via pgrep or ps as you
> suggested), starts more if necessary, writes status to syslog, and then
> quits? Much, much easier.
>

this is exactly how rq works - except it does both:  the feeder process is a
daemon, but one which refuses to start two copies of itself.  therefore a
crontab entry can be used to make it 'immortal'.  basically, the crontab
simply starts if it's not running, otherwise it does nothing.

cheers.

-a
-- 
in order to be effective truth must penetrate like an arrow - and that is
likely to hurt. -- wei wu wei