IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 41745 for trunk/tools


Ignore:
Timestamp:
Jul 30, 2021, 2:24:43 PM (5 years ago)
Author:
eugene
Message:

only run the rebalance rsyncs in the daytime

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/eam/rebalance/rebalance.mana

    r41508 r41745  
    216216  $target = /data/$tgthost.$tgtvol/rebalance/$srchost.$srcvol/nebulous
    217217
    218   for i 0 $NSUBDIR
     218  $TIMEFORMAT = mjd
     219
     220  for i 0 $NSUBDIR
     221
     222    $waitForDay = 1
     223    while ($waitForDay)
     224      # check if we should run the next rsync at this time:
     225      # only run except between HST = 19:00 - 05:00 or UT = 09:00 - 19:00
     226      ctimes -abs now -var tnow
     227      $thour = 24.0*($tnow - int($tnow))
     228      if (($thour > 5.0) && ($thour < 15.0))
     229        sleep 300
     230      else
     231        $waitForDay = 0
     232      end
     233    end
     234   
    219235    sprintf srcdir "%s/%02x" $source $i
    220236    sprintf tgtdir "%s/%02x" $target $i
Note: See TracChangeset for help on using the changeset viewer.