Index: trunk/MagicSoft/Mars/datacenter/scripts/jobmanager
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/jobmanager	(revision 7912)
+++ trunk/MagicSoft/Mars/datacenter/scripts/jobmanager	(revision 7913)
@@ -25,6 +25,6 @@
 # ========================================================================
 #
-# This a resource file for the scripts, in which paths, times and number 
-# of jobs for condor are stored. 
+# This a script, which launches other scripts (all scripts, that are run 
+# on primary basis
 #
 
@@ -76,16 +76,10 @@
       gettodo 
 
-      y=`date +%Y`
-      m=`date +%m`
-      d=`date +%d`
-      condordir=$logpath/condor/$y/$m/$d
+      date=`date +%Y/%m/%d`
+      date2=`date +%Y-%m-%d`
+      condordir=$logpath/condor/$date
       makedir $condordir #>> $scriptlog 2>&1
       
-#      echo "  ---> starting ${scripts[$i]} for $process" #>> $scriptlog 2>&1
-      
-      #test
-      contex
-      #test
-      if ! /usr/local/bin/condor_submit -a path=$scriptspath -a prog=${scripts[$i]} -a y=$y -a m=$m -a d=$d $scriptspath/run.condor 2>$errorlog
+      if ! /usr/local/bin/condor_submit -a path=$scriptspath -a prog=${scripts[$i]} -a date=$date2 -a dir=$condordir $scriptspath/run.condor 2>$errorlog
       then 
          date >> $errorlog
Index: trunk/MagicSoft/Mars/datacenter/scripts/run.condor
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/run.condor	(revision 7912)
+++ trunk/MagicSoft/Mars/datacenter/scripts/run.condor	(revision 7913)
@@ -2,10 +2,10 @@
 Executable    = $(path)/$(prog)
 Universe      = vanilla
-Log           = condor-$(y)-$(m)-$(d).log
-output        = log-$(y)-$(m)-$(d).log
-error         = error-$(y)-$(m)-$(d).log
+Log           = condor-$(date).log
+output        = log-$(date).log
+error         = error-$(date).log
 notification  = Error
 
-Initialdir = /magic/datacenter/autologs/condor/$(y)/$(m)/$(d)
+Initialdir = $(dir)
 
 Queue 
Index: trunk/MagicSoft/Mars/datacenter/scripts/scriptlauncher
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/scriptlauncher	(revision 7913)
+++ trunk/MagicSoft/Mars/datacenter/scripts/scriptlauncher	(revision 7913)
@@ -0,0 +1,57 @@
+#!/bin/sh
+#
+# ========================================================================
+#
+# *
+# * This file is part of MARS, the MAGIC Analysis and Reconstruction
+# * Software. It is distributed to you in the hope that it can be a useful
+# * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
+# * It is distributed WITHOUT ANY WARRANTY.
+# *
+# * Permission to use, copy, modify and distribute this software and its
+# * documentation for any purpose is hereby granted without fee,
+# * provided that the above copyright notice appear in all copies and
+# * that both that copyright notice and this permission notice appear
+# * in supporting documentation. It is provided "as is" without express
+# * or implied warranty.
+# *
+#
+#
+#   Author(s): Daniela Dorner  05/2005 <mailto:dorner@astro.uni-wuerzburg.de>
+#
+#   Copyright: MAGIC Software Development, 2000-2006
+#
+#
+# ========================================================================
+#
+# This a script, which launches other scripts
+#
+
+source `dirname $0`/sourcefile
+
+errorlog=$logpath/scriptlauncher/`date +%Y/%m`/error`date +%F`.log
+scriptslog=$logpath/scriptlauncher/`date +%Y/%m`/jobmanager`date +%F`.log
+
+date  #>> $scriptlog 2>&1
+
+path=`dirname $0`
+date=`date +%Y/%m/%d`
+date2=`date +%Y-%m-%d`
+condordir=$logpath/condor/$date
+makedir $condordir
+
+for i in $@
+do 
+   if [ "$i" = "allatthesametime" ]
+   then 
+      continue
+   fi
+   echo "launching $i..." #>> $scriptlog 2>&1
+   /usr/local/bin/condor_submit -a path=$path -a prog=$i -a date=$date2 -a dir=$condordir $path/run.condor >/dev/null  2>$errorlog
+   if ! echo $@ | grep "allatthesametime" >/dev/null 2>$errorlog
+   then
+      echo " waiting for $i to be done..." #>> $scriptlog 2>&1
+      /usr/local/bin/condor_wait $condordir/condor-$date2.log >/dev/null 2>$errorlog
+   fi
+done
+
