source: trunk/MagicSoft/Mars/datacenter/scripts/scriptlauncher@ 7918

Last change on this file since 7918 was 7918, checked in by Daniela Dorner, 19 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 1.8 KB
Line 
1#!/bin/sh
2#
3# ========================================================================
4#
5# *
6# * This file is part of MARS, the MAGIC Analysis and Reconstruction
7# * Software. It is distributed to you in the hope that it can be a useful
8# * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
9# * It is distributed WITHOUT ANY WARRANTY.
10# *
11# * Permission to use, copy, modify and distribute this software and its
12# * documentation for any purpose is hereby granted without fee,
13# * provided that the above copyright notice appear in all copies and
14# * that both that copyright notice and this permission notice appear
15# * in supporting documentation. It is provided "as is" without express
16# * or implied warranty.
17# *
18#
19#
20# Author(s): Daniela Dorner 05/2005 <mailto:dorner@astro.uni-wuerzburg.de>
21#
22# Copyright: MAGIC Software Development, 2000-2006
23#
24#
25# ========================================================================
26#
27# This a script, which launches other scripts
28#
29
30source `dirname $0`/sourcefile
31
32sllogpath=$logpath/scriptlauncher/`date +%Y/%m`
33makedir $sllogpath
34errorlog=$sllogpath/error`date +%F`.log
35scriptslog=$logpath/scriptlauncher`date +%F`.log
36
37date >> $scriptlog 2>&1
38
39path=`dirname $0`
40date=`date +%Y/%m/%d`
41date2=`date +%Y-%m-%d`
42condordir=$logpath/condor/$date
43makedir $condordir
44
45for i in $@
46do
47 if [ "$i" = "allatthesametime" ]
48 then
49 continue
50 fi
51 echo "launching $i..." >> $scriptlog 2>&1
52 /usr/local/bin/condor_submit -a path=$path -a prog=$i -a date=$date2 -a dir=$condordir $path/run.condor >/dev/null 2>$errorlog
53 if ! echo $@ | grep "allatthesametime" >/dev/null 2>$errorlog
54 then
55 echo " waiting for $i to be done..." >> $scriptlog 2>&1
56 /usr/local/bin/condor_wait $condordir/condor-$date2.log >/dev/null 2>$errorlog
57 fi
58done
59
Note: See TracBrowser for help on using the repository browser.