View Single Post
Old 07-09-2008, 08:55 AM  
Babaganoosh
♥♥♥ Likes Hugs ♥♥♥
 
Babaganoosh's Avatar
 
Industry Role:
Join Date: Nov 2001
Location: /home
Posts: 15,841
Quote:
Originally Posted by xenilk View Post
My idea of doing this would be to run the cronjob multiple time over the 6 hour span and have a random variable inside the script to make it execute or not. You will also need a value stored somewhere to see if you've already executed the script within the last 6 hours.

Good luck!
Exactly.

Generate a random number between 1-10, then if the random number is < or = a variable then execute the script. Otherwise exit with no action taken. If you set the variable to 2 for instance your script would have a 20% chance of executing.
__________________
I like pie.
Babaganoosh is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote