Index: /trunk/tools/czarpoll.pl
===================================================================
--- /trunk/tools/czarpoll.pl	(revision 29941)
+++ /trunk/tools/czarpoll.pl	(revision 29942)
@@ -14,5 +14,5 @@
 use czartool::Burntool;
 use czartool::DayMetrics;
-
+use czartool::MetricsIndex;
 
 my $period = 60;
@@ -126,5 +126,5 @@
 
         # sort out times
-        $begin = strftime('%Y-%m-%d 06:35', localtime);
+        $begin = strftime('%Y-%m-%d 06:30', localtime);
         $end = $czarDb->getNowTimestamp();
 
@@ -132,10 +132,20 @@
         if (!$doneMetricsToday && $czarDb->isBefore($begin, $end)) {
         
-                print "* Creating metrics for last 24 hours\n";
-                my $yesterday = $czarDb->subtractInterval($today, "1 DAY");
-                # TODO hardcoded path needs to be in config
-                my $dayMetrics = new czartool::DayMetrics($gpc1Db, $czarDb, "/data/ipp004.0/ipp/ippMetrics/", 1, 0, $yesterday); 
-                $dayMetrics->writeHTML();
-                $doneMetricsToday = 1;
+            # create metrics for last 24 hours
+            print "* Creating metrics for last 24 hours\n";
+            my $yesterday = $czarDb->subtractInterval($today, "1 DAY");
+            # TODO hardcoded path needs to be in config
+            my $dayMetrics = new czartool::DayMetrics($gpc1Db, 
+                    $czarDb, 
+                    "/data/ipp004.0/ipp/ippMetrics/", 
+                    1, 0, $yesterday); 
+            $dayMetrics->writeHTML();
+            $doneMetricsToday = 1;
+
+            # now update metrics index page
+            my $metricsIndex = new czartool::MetricsIndex($gpc1Db, 
+                    $czarDb, 
+                    "/data/ipp004.0/ipp/ippMetrics/", 
+                    1, 0); 
         }
 
