Index: /trunk/DataCheck/DataCheck/SchedulingPlots.sh
===================================================================
--- /trunk/DataCheck/DataCheck/SchedulingPlots.sh	(revision 18414)
+++ /trunk/DataCheck/DataCheck/SchedulingPlots.sh	(revision 18415)
@@ -1,5 +1,5 @@
 #!/bin/bash
 #
-# Script to copy scheduling plots to the web
+# Script to copy scheduling plots and suggested schedule to the web 
 #
 
@@ -8,4 +8,5 @@
 # be aware that the script only writes files which don't exist yet
 # i.e. in case of a new sw version, old files have to be deleted or moved away
+# you can also delete only the txt-files with the suggested schedule
 #
 # script to be executed on gate, i.e. FACT++ there has to be up-to-date
@@ -15,10 +16,14 @@
 
 # number of days to be treated
-numdays=1000
+numdays=2000
+
+mindate=20111101
+maxdate=20191231
 
 plot=/home/fact/FACT++/makeplots
+schedule=/users/fact/FACT++.dbg/makeschedule
 root=/opt/root_v5.34.10/bin/thisroot.sh
 
-# creating files for X days (if they don't exist yet)
+# creating files for $numdays days (if they don't exist yet)
 for (( i=0; i < $numdays ; i++))
 do 
@@ -27,11 +32,24 @@
       outpath=/home/factwww/scheduling/`date --date="${direction}${i}days" +%Y/%m/%d`
       date=`date --date="${direction}${i}days" +%Y-%m-%d`
+      date2=`date --date="${direction}${i}days" +%Y%m%d`
+      schedfile=$outpath"/schedule-"$date2".txt"
+      
+      if [ $date2 -gt $maxdate ] || [ $date2 -lt $mindate ]
+      then
+          continue
+      fi
       echo -n $date
-
       if ! [ -d $outpath ]
       then
          mkdir -p $outpath
       else
-         echo $outpath" exists -> continue"
+         if ! [ -e $schedfile ]
+         then 
+            echo -n " creating "$schedfile"..."
+            $schedule --config /home/fact/makeschedule_gate.rc --date '$date' >$schedfile 2>/dev/null
+         else
+            echo -n " "$outpath" already done -> continue"
+         fi
+         echo ""
          continue 
       fi
@@ -50,4 +68,6 @@
          pstoimg -quiet -scale $scale $file
       done
+      echo -n "creating "$schedfile" ..."
+      $schedule --config /home/fact/makeschedule_gate.rc --date '$date' >$schedfile 2>/dev/null
       echo ""
    done
