Last change
on this file since 18304 was 18213, checked in by Daniela Dorner, 9 years ago |
updated script to run regularly
|
-
Property svn:executable
set to
*
|
File size:
1.2 KB
|
Line | |
---|
1 | #!/bin/bash
|
---|
2 | #
|
---|
3 | source `dirname $0`/../Sourcefile.sh
|
---|
4 | printprocesslog "INFO starting $0 $1"
|
---|
5 |
|
---|
6 | # get dates
|
---|
7 | if [ "$certaindate" != "" ]
|
---|
8 | then
|
---|
9 | checkstring=`echo $certaindate | grep -E -o '^20[0-9][0-9]\/[01][0-9]\/[0-3][0-9]$'\|'^[0-9][0-9][0-9]$'`
|
---|
10 | if [ "$checkstring" = "" ]
|
---|
11 | then
|
---|
12 | echo "Please give the variable certaindate in the correct format (YYYY/MM/DD)"
|
---|
13 | finish
|
---|
14 | fi
|
---|
15 | getdates $certaindate
|
---|
16 | else
|
---|
17 | if [ "$1" = "" ]
|
---|
18 | then
|
---|
19 | # get last 6 nights if hour between 7 and 19h, else only current night
|
---|
20 | getdates 3 7 19
|
---|
21 | else
|
---|
22 | getdates $1
|
---|
23 | fi
|
---|
24 | fi
|
---|
25 |
|
---|
26 | # for testing only
|
---|
27 | anapath=/loc_data/analysis
|
---|
28 |
|
---|
29 | cd $mars
|
---|
30 |
|
---|
31 | for date in ${dates[@]}
|
---|
32 | do
|
---|
33 | outpath=$anapath/ratescans/$date
|
---|
34 | makedir $outpath
|
---|
35 | date2=`echo $date | sed -e 's/\///g'`
|
---|
36 | logfile=$outpath/$date2.log
|
---|
37 | printprocesslog "INFO root -q -b fact/plots/plotratescan.C\("\"$date2\""\) | tee $logfile | intgrep"
|
---|
38 | check1=`root -q -b fact/plots/plotratescan.C\("\"$date2\""\) | tee $logfile | intgrep`
|
---|
39 |
|
---|
40 | case $check1 in
|
---|
41 | 0) printprocesslog "INFO plotratescan.C was successful for date "$date2" (check1=$check1)"
|
---|
42 | ;;
|
---|
43 | *) printprocesslog "ERROR plotratescan.C failed for date "$date2" (check1=$check1)"
|
---|
44 | ;;
|
---|
45 | esac
|
---|
46 | done
|
---|
47 |
|
---|
48 |
|
---|
49 | finish
|
---|
50 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.