On Sun, 2009-03-29 at 20:44 +0200, mouss wrote:
> Karsten Bräckelmann a écrit :

> > It's the same classic problem with uninspired admins, running such cron
> > jobs strictly at a full hour.
> 
> In most cases, it's not the admins fault. many systems allow adding cron
> jobs by simply putting a file in a /some/path/hourly and so on instead
> of editing /etc/crontab (or running the crontab command). This is nice
> (exceptionally for packages when editing files is problematic), but on

Don't they also provide an /etc/cron.d/ to dump a single cron job per
file including the ability to specify the full run time? Mine do. ;)

> the other hand it doesn't provide flexibility for tasks such downloading
> data from a (more or less) central place.

Randomization isn't particularly hard.
  sleep $(( $RANDOM % 3600 ))

The debian daily spamassassin update cron job does exactly this, FWIW.


-- 
char *t="\10pse\0r\0dtu...@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}

Reply via email to