Re: Niced cron jobs
On Sat, Jun 26, 1999 at 10:19:39AM -0400, James R. Van Zandt wrote:
>
> Craig Sanders <cas@taz.net.au> wrote:
> >at the most there should be an /etc/cron.nice.conf (or an extra field
> >in /etc/default/rcS) file which allows people to set once and for all
> >what nice level their cron jobs run at - this could be read in by
> >/etc/init.d/cron when cron starts up, or alternatively by run-parts.
> >
> >if you're going to advocate doing weird and unusual things then you
> >should at least advocate doing it in a typically sensible debian fashion
> >- don't force it on everyone, make it an easily tweaked configuration
> >option.
>
> A /etc/cron.nice.conf read by run-parts sounds like an excellent
> compromise.
>
> I suggest that run-parts should accept a new option:
>
> --nice NUM
> If NUM is a number, then the scripts are run under "nice
> -NUM". Otherwise, if NUM is a file, then that file
> should contain the number. Comment lines starting with
> # should be ignored. That is, the scripts would be run
> under "nice `grep -v ^# NUM` ".
>
> An entry in /etc/crontab would look like this:
>
> 25 20 * * * root run-parts --report --nice /etc/cron.nice.conf \
> /etc/cron.daily
>
> And the standard /etc/cron.nice.conf would contain something like
> this:
>
> # "nice" value for running periodic jobs.
> # 10 for lower than normal priority (so as not to annoy online users).
> # -10 for higher than normal priority (possibly useful for a heavily
> # loaded machine, to ensure the jobs finish before being restarted).
> # no entry at all for normal priority.
> 10
What about this proposal ? Could all involved parties agree on this
setup ?
It's the best solution I've seen so far.
Greetings,
Christian
--
Christian Meder, email: meder@isr.uni-stuttgart.de
What's the railroad to me ?
I never go to see
Where it ends.
It fills a few hollows,
And makes banks for the swallows,
It sets the sand a-blowing,
And the blackberries a-growing.
(Henry David Thoreau)
Reply to: