Index: trunk/MagicSoft/Mars/datacenter/scripts/jobmanager
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/jobmanager	(revision 9121)
+++ trunk/MagicSoft/Mars/datacenter/scripts/jobmanager	(revision 9122)
@@ -68,4 +68,5 @@
 
       # check if there's something to do
+      column=${scriptscolname[$i]}
       getstatus >> $jmscriptlog 2>&1
       echo " $numproc ${scripts[$i]} still do to" >> $jmscriptlog 2>&1
Index: trunk/MagicSoft/Mars/datacenter/scripts/scriptlauncher
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/scriptlauncher	(revision 9121)
+++ trunk/MagicSoft/Mars/datacenter/scripts/scriptlauncher	(revision 9122)
@@ -31,7 +31,4 @@
 printprocesslog "INFO starting $0 $@"
 
-makedir $listpath
-makedir $lockpath
-
 errorlog=$runlogpath/scriptlauncher-error`date +%F`.log
 scriptlog=$runlogpath/scriptlauncher`date +%F`.log
@@ -42,24 +39,56 @@
 date=`date +%Y-%m-%d`
 
-scripts=( `echo $@ | sed -e 's/allatthesametime//'` )
-num=${#scripts[@]}
-echo "$num scripts have to be launched" >> $scriptlog 2>&1
-i=0
+num=$#
+echo "$num scripts have to be launched" #>> $scriptlog 2>&1
+i=1
 
-while [ $i -lt $num ]
+if echo $@ | grep "allatthesametime" >/dev/null 2>$errorlog
+then
+   all="yes"
+else
+   all="no"
+fi
+
+while [ $i -le $num ]
 do 
-   echo " launching ${scripts[$i]}..." >> $scriptlog 2>&1
-   pid=`/usr/local/bin/condor_submit -a path=$path -a prog=${scripts[$i]} -a date=$date -a dir=$runlogpath $path/run.condor 2>> $errorlog | grep 'submitted to cluster' | cut -dr -f2`
+   com=( )
+   prog=
+   if [ "$1" = "allatthesametime" ]
+   then
+      shift
+      i=`expr $i + 1`
+      continue
+   fi
+   com=( $1 )
+   prog=${com[0]}
+   if ! ls $path/${com[0]} >/dev/null 2>&1
+   then
+      echo "script $path/$1 does not exist." >> $scriptlog 2>&1
+      shift
+      i=`expr $i + 1`
+      continue
+   fi
+   if [ `echo $1 | wc -w` -gt 1 ]
+   then
+      unset com[0]
+      args='-a args="'${com[@]}'"'
+   fi
+   echo " launching $1..." >> $scriptlog 2>&1
+   echo "/usr/local/bin/condor_submit -a path=$path -a prog=$prog $args -a date=$date -a dir=$runlogpath $path/run.condor 2>> $errorlog | grep 'submitted to cluster' | cut -dr -f2" >> $scriptlog 2>&1
+   pid=`/usr/local/bin/condor_submit -a path=$path -a prog=$prog $args -a date=$date -a dir=$runlogpath $path/run.condor 2>> $errorlog | grep 'submitted to cluster' | cut -dr -f2`
    if [ "$pid" = "" ]
    then 
       echo `date`" WARN condor is not working " >> $errorlog 2>&1
-      printprocesslog "WARN submitting ${scripts[$i]} to condor failed"
+      printprocesslog "WARN submitting $1 to condor failed"
+      shift
+      i=`expr $i + 1`
       continue
    fi
-   if ! echo $@ | grep "allatthesametime" >/dev/null 2>$errorlog
+   if [ "$all" = "no" ]
    then
-      echo "  waiting for ${scripts[$i]} to be done..." >> $scriptlog 2>&1
+      echo "  waiting for $1 to be done..." >> $scriptlog 2>&1
       /usr/local/bin/condor_wait $runlogpath/condor-$date.log $pid >/dev/null 2>$errorlog
    fi
+   shift
    i=`expr $i + 1`
 done
Index: trunk/MagicSoft/Mars/datacenter/scripts/sourcefile
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/sourcefile	(revision 9121)
+++ trunk/MagicSoft/Mars/datacenter/scripts/sourcefile	(revision 9122)
@@ -37,6 +37,4 @@
 scriptspath=$mars/datacenter/scripts
 
-webpath=/www/htdocs/datacenter
-
 datetime=`date +%F-%H-%M-%S`
 
@@ -69,5 +67,4 @@
 
 makedir $lockpath
-makedir $listpath
 
 # set checkvalue to ok at the beginning of the scripts
@@ -107,4 +104,5 @@
 #again run process status
 FCompmux=26
+Fdowebplots=27
 
 # setup for jobmanager:
@@ -160,5 +158,5 @@
 function checklock()
 {
-   date > $lockfile
+   date > $lockfile 
    checklock0=$?
    case $checklock0 in
@@ -309,5 +307,4 @@
    numproc=
    getdbsetup
-   column=${scriptscolname[$i]}
    getstepinfo
    # get query
@@ -324,5 +321,4 @@
    query=$query" group by $column "
 #   echo " QUERY: "$query
-   numproc=0
    if ! numproc=`mysql -s -u $us --password=$pw --host=vela $db -e " $query "`
    then
@@ -336,4 +332,8 @@
 function setstatus()
 {
+   if [ "$column" = "no" ]
+   then
+      return
+   fi
    resetstatusvalues
    evalstatus $@
