From: Bruce W. <br...@mi...> - 2001-11-25 22:38:30
|
> Another spousal unit happy factor ;-) This will change the > current TV gird to > the next page through out the day, 10 minutes prior to the new > page start time. Another good idea. To allow for different tv_hour specs, I changed the code to check on every hour: # Set the default page to the current time # Check it a few minutes prior to the hour #f (time_cron "0 $config_parms{tv_hours} * * *") { if (time_cron "50 * * * *") { my $tvfile = sprintf "%02d_%02d.html", $Mday, $Hour + 1; my $tvdir = "$config_parms{html_dir}/tv"; $tvdir = &html_alias('tv') if &html_alias('tv'); if ( -e "$tvdir/$tvfile" ) { print_log "Updating TV index page for with $tvfile"; copy "$tvdir/$tvfile", "$tvdir/index.html"; } } I also noticed the related tv_info code I just posted had an error. This works better: my ($hour, $min); $hour = ($min == 28) ? $Hour : $Hour + 1; $min = ($min == 28) ? 30 : 00; Bruce |