source: trunk/DataCheck/Processing/RunMoreNights.sh@ 19975

Last change on this file since 19975 was 17080, checked in by Daniela Dorner, 11 years ago
added (script to run other script for several nights in parallel)
  • Property svn:executable set to *
File size: 1.7 KB
Line 
1#!/bin/bash
2
3source `dirname $0`/../Sourcefile.sh
4printprocesslog "INFO starting $0"
5
6doupdate="yes"
7#doupdate="no"
8
9# get all nights
10getdates "all"
11# get one single night
12#getdates "2013/08/13"
13# get several nights
14#getdates 15
15
16usesge="yes"
17#usesge="no"
18
19echo ${dates[@]}
20
21scripts=( \
22# ~/DataCheck/Processing/FillAuxCurrents.sh \
23# ~/DataCheck/Processing/FillAuxTemp.sh \
24# ~/DataCheck/Processing/FillDrsTemp.sh \
25# ~/DataCheck/Processing/FillAuxData.sh \
26# ~/DataCheck/QuickLook/Step2a.sh \
27# ~/DataCheck/Processing/FillEffectiveOn.sh \
28 ~/DataCheck/Processing/FillNumEvts.sh \
29# ~/DataCheck/Processing/FillAuxThresholds.sh \
30# ~/DataCheck/Processing/FillMoonInfo.sh \
31 )
32
33# start scripts for that night
34for date in ${dates[@]}
35do
36 echo $date
37 for script in ${scripts[@]}
38 do
39# echo $script" for "$date
40 name=`basename $script | sed -e 's/Fill//' -e 's/Aux//' | cut -c 1-3``echo $date | sed -e 's/\///g'`
41 date2=`echo $date | sed -e 's/\//-/g' | cut -c 3-8`
42 #echo $name
43 if [ "$usesge" = "yes" ]
44 then
45 echo "INFO submitting "$script" to the cluster for the night "$date
46 printprocesslog "INFO submitting "$script" to the cluster for the night "$date
47 $sgepath/qsub -b y -q fact_medium -v doupdate=$doupdate -v certaindate=$date -v AUTOMATIONSETUP=$AUTOMATIONSETUP -e $runlogpath"/error-"$date2".log" -o $runlogpath"/log-"$date2".log" -N $name $script $date
48 else
49 echo "INFO starting "$script" for date "$date" on "$HOST" ... "
50 printprocesslog "INFO starting "$script" for date "$date" on "$HOST" ... "
51 export certaindate="$date"
52 export doupdate="$doupdate"
53 $script #&
54 fi
55 done
56done
57
58finish
59
60
Note: See TracBrowser for help on using the repository browser.