When Is The Ports Tree Going To Be Updated?

Warren Block wblock at wonkity.com
Mon Nov 26 15:29:03 UTC 2012


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.


More information about the freebsd-questions mailing list