[mythtv-users] mythfilldatabase tip - random start time

Dan Berger dan at theidiots.org
Tue Feb 10 15:17:01 EST 2004


Great tip. Noone responded so instead of responding directly to David, I'll
respond to the whole list. Definitely doc worthy. 

>-----Original Message-----
>From: mythtv-users-bounces at mythtv.org 
>[mailto:mythtv-users-bounces at mythtv.org] On Behalf Of David Rees
>Sent: Monday, February 09, 2004 2:56 PM
>To: mythtv-users at mythtv.org
>Subject: [mythtv-users] mythfilldatabase tip - random start time
>
>Here's a tip for all you guys running mythfilldatabase from 
>cron (which I assume is nearly everyone!).  I imagine that the 
>majority of people use 3am or 4am as the start time to run 
>mythfilldatabase.  With hundreds of us running 
>mythfilldatabase at the same time, it wouldn't take much to 
>slasdot the information feed servers.  I know that zap2it's 
>servers get pretty slow sometimes.
>
>It's easy to randomize the start time, here's what I use in my crontab:
>
>0 3 * * * sleep $(expr $RANDOM \% 7200) && \
>    mythfilldatabase > /var/log/mythtv/mythfilldatabase.log 2>&1
>
>Now before running it will sleep a random amount of time 
>between 0 and 7200 seconds before running mythfilldatabase.  
>Might not be a bad idea to increase the range to 10000 
>seconds, but I figure some randomization is better than none.
>
>Notice I also redirect the output from mythfilldatabase to a 
>log file, make sure that the file is writable by the user 
>you're running mythfilldatabase as.  This can be handy in case 
>you need to troubleshoot any problems running mythfilldatabase.
>
>Hope this is useful, I would like to see these tips added to 
>any HOW-TOs out there.
>
>-Dave
>
>
>_______________________________________________
>mythtv-users mailing list
>mythtv-users at mythtv.org
>http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>



More information about the mythtv-users mailing list