| View previous topic :: View next topic |
| Author |
Message |
jandrews New
Joined: 13 Mar 2006 Posts: 6
|
Posted: Sat Apr 01, 2006 2:08 am Post subject: Randomizing Cron Jobs |
|
|
| What's the best way to randomize cron jobs? I want to have content and RSS feeds post to multiple websites at random intervals...instead of at 12 pm and 6 pm every day. |
|
| Back to top |
|
dominik Contributor

Joined: 24 Mar 2006 Posts: 13 Location: Kolin, Czech Republic
|
Posted: Sat Apr 01, 2006 8:53 am Post subject: Re: Randomizing Cron Jobs |
|
|
| jandrews wrote: | | What's the best way to randomize cron jobs? I want to have content and RSS feeds post to multiple websites at random intervals...instead of at 12 pm and 6 pm every day. |
Hello Jandrews!
It is not so complicated. You will make little utility, that runned from crontab file and when it is runned, it rewrites time information in crontab and exit. Then when time is coming on, it is running again and changing time in crontab again. It is also doing your job, not just updating crontab file.
in cron tab should be:
### my random entry ###
12 2 * * * root my_util.pl
### end ###
What do you think?
Dominik
working on www.stolni-voda.cz (now split testing 2 versions of sales letter)... |
|
| Back to top |
|
jandrews New
Joined: 13 Mar 2006 Posts: 6
|
Posted: Sat Apr 01, 2006 6:26 pm Post subject: |
|
|
Dominik - Your idea sounds good, but I'm not a programmer so the code part (in Perl?) makes absolutely no sense to me. Fortunately, I found an answer to my question on another board. A PHP script that delays the cron job (used in conjunction with RSS2B) did the trick. It uses $minimum_rand and $maximum_rand to delay the posting to a random interval.
Problem solved, but thanks for your input. Appreciate it. |
|
| Back to top |
|
Earl Lear Very Active Member

Joined: 02 Dec 2004 Posts: 199
|
Posted: Sat Apr 01, 2006 11:19 pm Post subject: |
|
|
J,
Did you get my response? I answered your post.
Respectfully,
Earl Lear _________________ Get Webspinner get a huge bonus pack from me.. |
|
| Back to top |
|
jandrews New
Joined: 13 Mar 2006 Posts: 6
|
Posted: Sun Apr 02, 2006 2:03 am Post subject: |
|
|
| Got it. Thanks Earl. I posted back to you on the forum. |
|
| Back to top |
|
jspcameron New
Joined: 30 Sep 2006 Posts: 1
|
Posted: Sat Sep 30, 2006 9:11 pm Post subject: Randomizing Cron Jobs |
|
|
This is exactly the kind of script I'm looking for but can't find anywhere.
Jandrews / Earl -- can you tell me where I can find this script?
- jk |
|
| Back to top |
|
|