Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Jun 2004 13:02:14 -0700
From:      Jos Backus <jos@catnook.com>
To:        current@freebsd.org
Subject:   Re: Problems with periodic scripts in jails [Cron <operator@sosai> /usr/libexec/save-entropy]
Message-ID:  <20040602200236.GA72488@lizzy.catnook.com>
In-Reply-To: <9C375698-B4CD-11D8-9C6A-003065ABFD92@mac.com>
References:  <20040602134523.GA26835@genius.tao.org.uk> <20040602140148.GA27036@genius.tao.org.uk> <20040602140923.GA27070@genius.tao.org.uk> <20040603011806.E25331@gamplex.bde.org> <20040602161148.GA3067@dan.emsphone.com> <9C375698-B4CD-11D8-9C6A-003065ABFD92@mac.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jun 02, 2004 at 03:46:58PM -0400, Charles Swiger wrote:
> My suggestion would be to move the invocation of lockfile into the 
> runjob script itself, so that your crontab is smaller and less 
> cluttered, and your runjob scripts become smart enough to fend for 
> themselves.

Or use a service controller (e.g. svc -o /service/foo). The service controller
guarantees that only one instance of the service will be active at any one
time. Combine this with starting the service just once. Bonus: no lock files
needed at all.

-- 
Jos Backus                       _/  _/_/_/      Sunnyvale, CA
                                _/  _/   _/
                               _/  _/_/_/
                          _/  _/  _/    _/
jos at catnook.com        _/_/   _/_/_/          require 'std/disclaimer'



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040602200236.GA72488>