Changeset 18415 for trunk/DataCheck


Ignore:
Timestamp:
01/23/16 19:41:26 (9 years ago)
Author:
Daniela Dorner
Message:
added writing of txt file with suggested schedule
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DataCheck/DataCheck/SchedulingPlots.sh

    r17897 r18415  
    11#!/bin/bash
    22#
    3 # Script to copy scheduling plots to the web
     3# Script to copy scheduling plots and suggested schedule to the web
    44#
    55
     
    88# be aware that the script only writes files which don't exist yet
    99# i.e. in case of a new sw version, old files have to be deleted or moved away
     10# you can also delete only the txt-files with the suggested schedule
    1011#
    1112# script to be executed on gate, i.e. FACT++ there has to be up-to-date
     
    1516
    1617# number of days to be treated
    17 numdays=1000
     18numdays=2000
     19
     20mindate=20111101
     21maxdate=20191231
    1822
    1923plot=/home/fact/FACT++/makeplots
     24schedule=/users/fact/FACT++.dbg/makeschedule
    2025root=/opt/root_v5.34.10/bin/thisroot.sh
    2126
    22 # creating files for X days (if they don't exist yet)
     27# creating files for $numdays days (if they don't exist yet)
    2328for (( i=0; i < $numdays ; i++))
    2429do
     
    2732      outpath=/home/factwww/scheduling/`date --date="${direction}${i}days" +%Y/%m/%d`
    2833      date=`date --date="${direction}${i}days" +%Y-%m-%d`
     34      date2=`date --date="${direction}${i}days" +%Y%m%d`
     35      schedfile=$outpath"/schedule-"$date2".txt"
     36     
     37      if [ $date2 -gt $maxdate ] || [ $date2 -lt $mindate ]
     38      then
     39          continue
     40      fi
    2941      echo -n $date
    30 
    3142      if ! [ -d $outpath ]
    3243      then
    3344         mkdir -p $outpath
    3445      else
    35          echo $outpath" exists -> continue"
     46         if ! [ -e $schedfile ]
     47         then
     48            echo -n " creating "$schedfile"..."
     49            $schedule --config /home/fact/makeschedule_gate.rc --date '$date' >$schedfile 2>/dev/null
     50         else
     51            echo -n " "$outpath" already done -> continue"
     52         fi
     53         echo ""
    3654         continue
    3755      fi
     
    5068         pstoimg -quiet -scale $scale $file
    5169      done
     70      echo -n "creating "$schedfile" ..."
     71      $schedule --config /home/fact/makeschedule_gate.rc --date '$date' >$schedfile 2>/dev/null
    5272      echo ""
    5373   done
Note: See TracChangeset for help on using the changeset viewer.