When Is The Ports Tree Going To Be Updated?
Stas Verberkt
lists at legolasweb.nl
Mon Nov 26 15:36:39 UTC 2012
Warren Block schreef op :
> On Mon, 26 Nov 2012, kpneal at 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.
>
If I recall correctly portsnap refuses to run the "fetch"-command when
not
in an interactive shell, thereby forcing you to use the "cron"-command.
(As does freebsd-update.)
More information about the freebsd-questions
mailing list