Re: [dwm] mail notification again

From: Jukka Salmi <j+dwm_AT_2008.salmi.ch>
Date: Thu, 10 Jan 2008 15:12:30 +0100

Peter Vollmar --> dwm (2008-01-10 14:12:30 +0100):
> Am 10 Jan schrieb Jukka Salmi:
[...]
> > Run all commands except fetchmail every n seconds in a loop as you
> > already do, and fetchmail only every m loop iterations. Thus fetchmail
> > will be executed only every mn seconds.
> yes, that sounds like what I need, thanks also to Martin and Antony. I
> don't have cron,

Hmm, is "Ubuntu Christian Edition" required to ship totally daemon-free?
;-)

> so I'm interested in a separate loop (or distinct loop
> iterations), but I don't know how to do it :-)

try e.g. something like the following C-like pseudo-code:

        for (i=0; ; i=(i+1)%m) {
            execute non-fetchmail commands
            if (!i) execute fetchmail
            sleep for n seconds
        }

HTH, Jukka

> Computer: www.vollmar.ch/linux

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~
Received on Thu Jan 10 2008 - 15:12:32 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:15:29 UTC