Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Nov 2012 08:29:01 -0700 (MST)
From:      Warren Block <wblock@wonkity.com>
To:        kpneal@pobox.com
Cc:        freebsd-questions@freebsd.org
Subject:   Re:  When Is The Ports Tree Going To Be Updated?
Message-ID:  <alpine.BSF.2.00.1211260828020.32092@wonkity.com>
In-Reply-To: <20121126145818.GA66335@neutralgood.org>
References:  <50B2A57A.3050500@tundraware.com> <50B2A8D8.90301@FreeBSD.org> <50B2AA07.8090103@tundraware.com> <201211251856.40381.lumiwa@gmail.com> <50B2BEE1.9030903@tundraware.com> <50B31AAB.6000903@FreeBSD.org> <50B36500.7040308@tundraware.com> <CAAdA2WMVmtdsC3zpjz3WsmdopsuavhcVTC8TFuG-n_auPB77rg@mail.gmail.com> <50B377F4.1020507@freebsd.org> <20121126145818.GA66335@neutralgood.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 26 Nov 2012, kpneal@pobox.com wrote:

> On Mon, Nov 26, 2012 at 02:08:52PM +0000, Matthew Seaman wrote:
>> Secondly, for the sake of the servers, please don't run 'portsnap fetch'
>> from a cron job.  You're not the only person to think of doing that, and
>> most people who do have the job run at the top of the hour.  This is
>> bad.  The servers really don't like it when several thousand cronjobs
>> all fire off simultaneously and the system load goes through the roof.
>> Which is why 'portsnap cron' exists -- it does exactly the same as
>> fetch, except it waits for a random amount of time before pulling down
>> any data.
>
> More generally, a cron job can be run with a random delay added before
> the real job kicks off. Just prefix the command you want cron to run
> like so:
>
> sleep $(jot -r 1 1 900) && command to run
>
> If you like, replace 900 with some other number to change the upper bound
> on the number of seconds to delay.

portsnap has a "cron" command that does this.



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