Re: Randomizing a 24hr time period

2011-02-09 Thread Paul Johnson
On Wed, Feb 09, 2011 at 10:52:24PM +, Rob Dixon wrote: > On 09/02/2011 17:05, Paul Johnson wrote: > > > >Of course you can redefine the problem this way, but it's more interesting to > >solve the original problem. > > > >To go with Rob's solution, here's something that's (more) correct: > Hey

Re: Randomizing a 24hr time period

2011-02-09 Thread Mike Blezien
- Original Message - From: "Jim Gibson" To: "Perl List" Sent: Wednesday, February 09, 2011 6:15 PM Subject: Re: Randomizing a 24hr time period On 2/9/11 Wed Feb 9, 2011 2:30 PM, "Mike Blezien" scribbled: - Original Message - From: "

Re: Randomizing a 24hr time period

2011-02-09 Thread Jim Gibson
On 2/9/11 Wed Feb 9, 2011 2:30 PM, "Mike Blezien" scribbled: > - Original Message - > From: "Jim Gibson" > To: "Perl List" > Sent: Wednesday, February 09, 2011 4:04 PM > Subject: Re: Randomizing a 24hr time period > > &g

Re: Randomizing a 24hr time period

2011-02-09 Thread Rob Dixon
On 09/02/2011 17:05, Paul Johnson wrote: Of course you can redefine the problem this way, but it's more interesting to solve the original problem. To go with Rob's solution, here's something that's (more) correct: #!/usr/bin/perl use strict; use warnings; my ($messages, $time_period) = @ARG

Re: Randomizing a 24hr time period

2011-02-09 Thread Mike Blezien
- Original Message - From: "Jim Gibson" To: "Perl List" Sent: Wednesday, February 09, 2011 4:04 PM Subject: Re: Randomizing a 24hr time period On 2/9/11 Wed Feb 9, 2011 1:05 PM, "Mike Blezien" scribbled: - Original Message - From: "P

Re: Randomizing a 24hr time period

2011-02-09 Thread Jim Gibson
On 2/9/11 Wed Feb 9, 2011 1:05 PM, "Mike Blezien" scribbled: > - Original Message - > From: "Paul Johnson" > To: "Uri Guttman" > Cc: "Mike Blezien" ; "Perl List" > Sent: Wednesday, February 09, 2011 11:05 AM > Subje

Re: Randomizing a 24hr time period

2011-02-09 Thread Mike Blezien
- Original Message - From: "Paul Johnson" To: "Uri Guttman" Cc: "Mike Blezien" ; "Perl List" Sent: Wednesday, February 09, 2011 11:05 AM Subject: Re: Randomizing a 24hr time period On Wed, Feb 09, 2011 at 11:16:07AM -0500, Uri Guttman wr

Re: Randomizing a 24hr time period

2011-02-09 Thread Mike Blezien
- Original Message - From: "Paul Johnson" To: "Uri Guttman" Cc: "Mike Blezien" ; "Perl List" Sent: Wednesday, February 09, 2011 11:05 AM Subject: Re: Randomizing a 24hr time period On Wed, Feb 09, 2011 at 11:16:07AM -0500, Uri Guttman wr

Re: Randomizing a 24hr time period

2011-02-09 Thread Paul Johnson
On Wed, Feb 09, 2011 at 11:16:07AM -0500, Uri Guttman wrote: > > "MB" == Mike Blezien writes: > > >> as i said a simple solution is to slice up the 24 hours into fixed > >> intervals. then pick a random time INSIDE each interval. random enough > >> for those types of people. this is clo

Re: Randomizing a 24hr time period

2011-02-09 Thread Robert Wohlfarth
On Wed, Feb 9, 2011 at 9:41 AM, Rob Dixon wrote: > On 07/02/2011 21:30, Mike Blezien wrote: > >> I'm trying to come up with a function to send out X number of message per >> day(24hr day) but we need to randomize the time factore each day. For >> example if >> 50 messages are scheduled to be sent

Re: Randomizing a 24hr time period

2011-02-09 Thread Uri Guttman
> "MB" == Mike Blezien writes: >> as i said a simple solution is to slice up the 24 hours into fixed >> intervals. then pick a random time INSIDE each interval. random enough >> for those types of people. this is close to one message an hour so there >> is plenty of variability within

Re: Randomizing a 24hr time period

2011-02-09 Thread Skirv
-=-=-=-=-= > Thunder Rain Internet Publishing > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > - Original Message - > From: Uri Guttman > To: Mike Blezien > Cc: Perl List ; Mike McClain > Sent: Wednesday, February 09, 2011 5:06 AM > Subject: Re: Randomizing a 24hr time period > > > >&

Re: Randomizing a 24hr time period

2011-02-09 Thread Mike Blezien
- Original Message - From: "Uri Guttman" To: "Mike Blezien" Cc: "Perl List" ; "Mike McClain" Sent: Wednesday, February 09, 2011 9:35 AM Subject: Re: Randomizing a 24hr time period "MB" == Mike Blezien writes: MB> What t

Re: Randomizing a 24hr time period

2011-02-09 Thread Rob Dixon
On 07/02/2011 21:30, Mike Blezien wrote: Hello, I'm trying to come up with a function to send out X number of message per day(24hr day) but we need to randomize the time factore each day. For example if 50 messages are scheduled to be sent out in 24 hr time period we want to randomize the times

Re: Randomizing a 24hr time period

2011-02-09 Thread Uri Guttman
> "MB" == Mike Blezien writes: MB> What they have right now are about 25 messages they wish to spread MB> out through out a 24hr period so they are sent out randomly during MB> this 24 period, not a pre determined every X minutes or X MB> hours. Why I'm not really sure, but that'

Re: Randomizing a 24hr time period

2011-02-09 Thread Mike Blezien
Sent: Wednesday, February 09, 2011 5:06 AM Subject: Re: Randomizing a 24hr time period >>>>> "MB" == Mike Blezien writes: MB> Uri, MB> yes that does make sense but that's what the customer wants :) MB> There always right aren't they !! th

Re: Randomizing a 24hr time period

2011-02-09 Thread Uri Guttman
> "MB" == Mike Blezien writes: MB> Uri, MB> yes that does make sense but that's what the customer wants :) MB> There always right aren't they !! then do something very simple. send a message every N minutes where N is randomly picked from say 5-10. they will never know it wasn't a mor

Re: Randomizing a 24hr time period

2011-02-09 Thread Mike Blezien
al Message - From: Uri Guttman To: Mike Blezien Cc: Perl List ; Mike McClain Sent: Wednesday, February 09, 2011 4:06 AM Subject: Re: Randomizing a 24hr time period >>>>> "MB" == Mike Blezien writes: MB> it isn't for spam I assure you. A client of ou

Re: Randomizing a 24hr time period

2011-02-09 Thread Uri Guttman
> "MB" == Mike Blezien writes: MB> it isn't for spam I assure you. A client of ours sends out 25-50, MB> messages/quotes, a day to various spiritual web sites. And they MB> have already been approved by the web sites they are posted MB> too. They just wanted a solution to randomize wh

Re: Randomizing a 24hr time period

2011-02-09 Thread Mike Blezien
31 PM Subject: Re: Randomizing a 24hr time period On Mon, Feb 07, 2011 at 03:30:03PM -0600, Mike Blezien wrote: > I'm trying to come up with a function to send out X number of message per > day(24hr day) but we need to randomize the time factore each day. For > Hope this

Re: Randomizing a 24hr time period

2011-02-09 Thread Mike McClain
On Mon, Feb 07, 2011 at 03:30:03PM -0600, Mike Blezien wrote: > I'm trying to come up with a function to send out X number of message per > day(24hr day) but we need to randomize the time factore each day. For > Hope this makes sense, and someone may have done this before or may have > some in

Re: Randomizing a 24hr time period

2011-02-07 Thread Mike Blezien
Thanks Jim, this helps allot. You've given me a good starting point. Appreciate the help. Mike - Original Message - From: Jim Gibson To: Perl List Sent: Monday, February 07, 2011 5:52 PM Subject: Re: Randomizing a 24hr time period On 2/7/11 Mon Feb 7, 2011 1:

Re: Randomizing a 24hr time period

2011-02-07 Thread Jim Gibson
On 2/7/11 Mon Feb 7, 2011 1:30 PM, "Mike Blezien" scribbled: > Hello, > > I'm trying to come up with a function to send out X number of message per > day(24hr day) but we need to randomize the time factore each day. For example > if > 50 messages are scheduled to be sent out in 24 hr time per