Index: trunk/tools/eam/rebalance/rebalance.mana
===================================================================
--- trunk/tools/eam/rebalance/rebalance.mana	(revision 41742)
+++ trunk/tools/eam/rebalance/rebalance.mana	(revision 41745)
@@ -216,5 +216,21 @@
   $target = /data/$tgthost.$tgtvol/rebalance/$srchost.$srcvol/nebulous
 
-  for i 0 $NSUBDIR
+  $TIMEFORMAT = mjd
+
+  for i 0 $NSUBDIR
+
+    $waitForDay = 1
+    while ($waitForDay)
+      # check if we should run the next rsync at this time:
+      # only run except between HST = 19:00 - 05:00 or UT = 09:00 - 19:00 
+      ctimes -abs now -var tnow
+      $thour = 24.0*($tnow - int($tnow))
+      if (($thour > 5.0) && ($thour < 15.0))
+        sleep 300
+      else
+        $waitForDay = 0
+      end
+    end
+    
     sprintf srcdir "%s/%02x" $source $i
     sprintf tgtdir "%s/%02x" $target $i
