Changeset 19481
- Timestamp:
- 04/02/19 22:27:09 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataCheck/Tools/print_schedule.sh
r19480 r19481 1 1 #!/bin/bash 2 2 # 3 # Script to copy scheduling plots and suggested schedule to the web3 # Script to print FACT schedule 4 4 # 5 6 # remarks: 7 # 8 # be aware that the script only writes files which don't exist yet 9 # 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 11 # 12 # script to be executed on gate, i.e. FACT++ there has to be up-to-date 13 14 # create plots for past (-) / future (+) night 15 directions=( "-" "+" ) 5 # Remarks: 6 # make sure to use right setup for makeschedule 7 # make sure that numdays is large enough to cover 8 # from start to end 16 9 17 10 # number of days to be treated … … 19 12 #numdays=7 20 13 21 schedulefile=/home/dorner/FACT-Schedule-for-XMM.txt 22 mrk421file=/home/dorner/FACT-Schedule-Mrk421.txt 23 mrk501file=/home/dorner/FACT-Schedule-Mrk501.txt 24 mrk1959file=/home/dorner/FACT-Schedule-1959.txt 14 # time range 15 start=20200101 16 end=20201231 17 18 19 # for XMM Newton 20 schedulefile=/home/dorner/FACT.schedule/for.XMM/FACT-Schedule-for-XMM.txt 21 mrk421file=/home/dorner/FACT.schedule/for.XMM/FACT-Schedule-Mrk421.txt 22 mrk501file=/home/dorner/FACT.schedule/for.XMM/FACT-Schedule-Mrk501.txt 23 mrk1959file=/home/dorner/FACT.schedule/for.XMM/FACT-Schedule-1959.txt 24 # for INTEGRAL proposal 25 schedulefile=/home/dorner/FACT.schedule/for.INTEGRAL.proposal/FACT-Schedule-for-XMM.txt 26 mrk421file=/home/dorner/FACT.schedule/for.INTEGRAL.proposal/FACT-Schedule-Mrk421.txt 27 mrk501file=/home/dorner/FACT.schedule/for.INTEGRAL.proposal/FACT-Schedule-Mrk501.txt 28 mrk1959file=/home/dorner/FACT.schedule/for.INTEGRAL.proposal/FACT-Schedule-1959.txt 25 29 26 30 #exit 27 31 28 32 # filling file 29 echo "# FACT Schedule from 2019-01-01 till 2020-12-31" > $schedulefile 33 echo "# FACT Schedule from "`date --date="$start" +%Y-%m-%d`" till " `date --date="$end" +%Y-%m-%d` > $schedulefile 34 echo "# FACT Schedule from "`date --date="$start" +%Y-%m-%d`" till " `date --date="$end" +%Y-%m-%d` 30 35 31 36 # creating files for $numdays days (if they don't exist yet) 32 37 for (( i=0; i < $numdays ; i++)) 33 38 do 34 date=`date --date="20190101+${i}days" +%Y-%m-%d` 35 date2=`date --date="20190101+${i}days" +%Y%m%d` 36 echo $date 39 date=`date --date="$start+${i}days" +%Y-%m-%d` 40 date2=`date --date="$start+${i}days" +%Y%m%d` 41 if [ $date2 -gt $end ] 42 then 43 continue 44 fi 37 45 #num=`~/SW/FACT++.2019.01.01/build/makeschedule $date 2>/dev/null | tail -9 | grep ^201 | grep -c SHUTDOWN` 38 46 ~/SW/FACT++.2019.01.01/build/makeschedule $date 2>/dev/null | sed -e '1,/SHUTDOWN/d' | grep ^20[12][0-9] >> $schedulefile
Note:
See TracChangeset
for help on using the changeset viewer.