Re: Creating a randomized cron entry

2005-12-15 Thread Ken Bloom
Florian Weimer wrote: > * Christoph Berg: > > >>Re: Florian Weimer in <[EMAIL PROTECTED]> >> >>>I'd like to create a cron entry which is run once a day, at some >>>random time. This is necessary because the cron entry will result in >>>a request over the network, and I want to avoid that all hos

Re: Creating a randomized cron entry

2005-12-15 Thread Joey Hess
Henrique de Moraes Holschuh wrote: > "at" has a very bad history security-wise, and I really doubt anyone is > seriously maintaining and fixing that thing. Now, if someone would rewrite > from scratch an "at" designed and implemented for security, that would be > very cool indeed. at had one secu

Re: Creating a randomized cron entry

2005-12-15 Thread Joey Hess
Florian Weimer wrote: > I'm not sure what users would expect from such a service. In the case of debsecan, as an admin I would expect something consistent, so I can, for example, start the day with a coffee and a security report, rather than getting the report at some random time during the day.

Re: Creating a randomized cron entry

2005-12-15 Thread Don Armstrong
On Thu, 15 Dec 2005, Henrique de Moraes Holschuh wrote: > "at" has a very bad history security-wise, and I really doubt anyone > is seriously maintaining and fixing that thing. Now, if someone > would rewrite from scratch an "at" designed and implemented for > security, that would be very cool inde

Re: Creating a randomized cron entry

2005-12-15 Thread Don Armstrong
On Thu, 15 Dec 2005, Stephen Gran wrote: > This one time, at band camp, Don Armstrong said: > > On Thu, 15 Dec 2005, Florian Weimer wrote: > > > I'd like to create a cron entry which is run once a day, at some > > > random time. This is necessary because the cron entry will result > > > in a requ

Re: Creating a randomized cron entry

2005-12-15 Thread Stefano Zacchiroli
On Thu, Dec 15, 2005 at 11:07:17PM +0100, Florian Weimer wrote: > I mainly want to avoid a scenario where all clients arrive at 17 > minutes past the full hour, and need to be served at the same time. Then I would go for a cron entry at the earliest time you want the script to be run (say 6:00 AM)

Re: Creating a randomized cron entry

2005-12-15 Thread Florian Weimer
* Stefano Zacchiroli: > Well, it is random of course. If the distribution is uniform you're > granted that in the long run it will be run on the average once per day. > I don't know how stringent were the requirements that the program should > be run once per day, no more, no less ... I need this

Re: Creating a randomized cron entry

2005-12-15 Thread Florian Weimer
* Christoph Berg: > Re: Florian Weimer in <[EMAIL PROTECTED]> >> I'd like to create a cron entry which is run once a day, at some >> random time. This is necessary because the cron entry will result in >> a request over the network, and I want to avoid that all hosts in a >> time zone pound the s

Re: Creating a randomized cron entry

2005-12-15 Thread Stefano Zacchiroli
On Thu, Dec 15, 2005 at 03:24:00PM -0500, Justin Pryzby wrote: > This of course has the possibility of running multiple times, so you > might have to include into the cronjob a test: > rm /var/run/foo/ran-today 2>/dev/null && exit 0 > It also doesn't guarantee that it runs at all in any given day

Re: Creating a randomized cron entry

2005-12-15 Thread Justin Pryzby
On Thu, Dec 15, 2005 at 08:48:04PM +, Stephen Gran wrote: > This one time, at band camp, Justin Pryzby said: > > On Thu, Dec 15, 2005 at 12:55:00PM +, Stephen Gran wrote: > > > > > > Probably the most portable way to handle it is to run the job from > > > cron.daily, but call a wrapper scr

Re: possibly undefined macro: AS_FOR_TARGET

2005-12-15 Thread Margarita Manterola
On 12/15/05, Alexei Chetroi <[EMAIL PROTECTED]> wrote: > Googling, I found that AS_FOR_TARGET must be changed to GAS_FOR_TARGET, > in configure.in but that raise another question. I cannot use > dpatch to fix configure.in and changing it from $(PACKAGE).diff.gz is > not recommended. How it is re

Re: Creating a randomized cron entry

2005-12-15 Thread Stephen Gran
This one time, at band camp, Justin Pryzby said: > On Thu, Dec 15, 2005 at 12:55:00PM +, Stephen Gran wrote: > > > > Probably the most portable way to handle it is to run the job from > > cron.daily, but call a wrapper script that sleeps for a random amount of > > time less than one day before

Re: Creating a randomized cron entry

2005-12-15 Thread Justin Pryzby
On Thu, Dec 15, 2005 at 10:59:20AM +0100, Stefano Zacchiroli wrote: > On Thu, Dec 15, 2005 at 09:05:03AM +0100, Florian Weimer wrote: > > What is the recommended way to achieve this? Include a script, to be > > Not a recommended way, but what about creating an entry which is > executed every minu

Re: Creating a randomized cron entry

2005-12-15 Thread Justin Pryzby
On Thu, Dec 15, 2005 at 12:55:00PM +, Stephen Gran wrote: > This one time, at band camp, Don Armstrong said: > > On Thu, 15 Dec 2005, Florian Weimer wrote: > > > I'd like to create a cron entry which is run once a day, at some > > > random time. This is necessary because the cron entry will re

Re: possibly undefined macro: AS_FOR_TARGET

2005-12-15 Thread Justin Pryzby
On Thu, Dec 15, 2005 at 06:28:46PM +0200, Alexei Chetroi wrote: > Googling, I found that AS_FOR_TARGET must be changed to GAS_FOR_TARGET, > in configure.in but that raise another question. I cannot use > dpatch to fix configure.in Why not? > and changing it from $(PACKAGE).diff.gz is not recomme

possibly undefined macro: AS_FOR_TARGET

2005-12-15 Thread Alexei Chetroi
Hi, I'm trying to make a package, according to autotools-dev/README.Debian recommendations, but "autoreconf --force --install" gives me error: configure.in:2207: error: possibly undefined macro: AS_FOR_TARGET If this token and others are legitimate, please use m4_pattern_allow. Se

Re: Creating a randomized cron entry

2005-12-15 Thread Christoph Berg
Re: Florian Weimer in <[EMAIL PROTECTED]> > I'd like to create a cron entry which is run once a day, at some > random time. This is necessary because the cron entry will result in > a request over the network, and I want to avoid that all hosts in a > time zone pound the server at the same time.

Re: Creating a randomized cron entry

2005-12-15 Thread Henrique de Moraes Holschuh
On Thu, 15 Dec 2005, Don Armstrong wrote: > Why not just something like: > > 0 0 * * * at now + $(( $RANDOM \% 1440 )) minutes [...] Because "at" is something you should never have installed (it is the very first thing I purge, after fixing the dumb wide-open defaults we use for hosts.allow and h

Re: Creating a randomized cron entry

2005-12-15 Thread Stephen Gran
This one time, at band camp, Don Armstrong said: > On Thu, 15 Dec 2005, Florian Weimer wrote: > > I'd like to create a cron entry which is run once a day, at some > > random time. This is necessary because the cron entry will result > > in a request over the network, and I want to avoid that all h

Re: Creating a randomized cron entry

2005-12-15 Thread Don Armstrong
On Thu, 15 Dec 2005, Florian Weimer wrote: > I'd like to create a cron entry which is run once a day, at some > random time. This is necessary because the cron entry will result in > a request over the network, and I want to avoid that all hosts in a > time zone pound the server at the same time.

Re: Creating a randomized cron entry

2005-12-15 Thread Stefano Zacchiroli
On Thu, Dec 15, 2005 at 09:05:03AM +0100, Florian Weimer wrote: > What is the recommended way to achieve this? Include a script, to be Not a recommended way, but what about creating an entry which is executed every minute and contains a "toss a coin" like function with a probability of 1 / (numbe

Re: Creating a randomized cron entry

2005-12-15 Thread Florian Weimer
* Andreas Barth: >> I think Debian's cron package has reached end-of-life. 8-) fcron >> already implements randomization. Perhaps not in the best possible >> way, but basic support is available. > > Well, I really think we should be able to use randomized times in > /etc/cron.d/something. If our

Re: Creating a randomized cron entry

2005-12-15 Thread Andreas Barth
* Florian Weimer ([EMAIL PROTECTED]) [051215 09:24]: > * Andreas Barth: > > * Florian Weimer ([EMAIL PROTECTED]) [051215 09:05]: > >> What is the recommended way to achieve this? Include a script, to be > >> run manually, which creates the cron entry? (In this case, that would > >> be acceptable

Re: Creating a randomized cron entry

2005-12-15 Thread Florian Weimer
* Andreas Barth: > * Florian Weimer ([EMAIL PROTECTED]) [051215 09:05]: >> What is the recommended way to achieve this? Include a script, to be >> run manually, which creates the cron entry? (In this case, that would >> be acceptable because the cron entry creation should probably be >> optional

Re: Creating a randomized cron entry

2005-12-15 Thread Andreas Barth
* Florian Weimer ([EMAIL PROTECTED]) [051215 09:05]: > What is the recommended way to achieve this? Include a script, to be > run manually, which creates the cron entry? (In this case, that would > be acceptable because the cron entry creation should probably be > optional anyway.) Shall I remov

Creating a randomized cron entry

2005-12-15 Thread Florian Weimer
I'd like to create a cron entry which is run once a day, at some random time. This is necessary because the cron entry will result in a request over the network, and I want to avoid that all hosts in a time zone pound the server at the same time. What is the recommended way to achieve this? Incl