Ignore:
Timestamp:
02/03/06 16:42:00 (19 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/datacenter/scripts
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/datacenter/scripts/buildsequenceentries

    r7471 r7476  
    4646table=SequenceBuildStatus
    4747column=fSequenceEntriesBuilt
    48 date=NULL
    49 datetime=`date +%F-%H-%M-%S`
    50 year=`date +%Y`
    5148
    5249todofile=$listpath/ToDo-$table-$column.txt
    53 getstatuslogpath=$logpath/getstatus/$program/$year
    54 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log
     50lockfile=$lockpath/lock-$program.txt
    5551
    5652scriptlogpath=$logpath/run/$program/`date +%Y/%m`
     
    6056date >> $scriptlog 2>&1
    6157
    62 makedir $getstatuslogpath >> $scriptlog 2>&1
    63 
    6458# check if script is already running
    65 date > $lockpath/lock-$program.txt >> $scriptlog 2>&1
     59date > $lockfile >> $scriptlog 2>&1
    6660checklock0=$?
    6761case $checklock0 in
     
    7569
    7670# get todo list
    77 echo "getting todo list..." >> $scriptlog 2>&1
    78 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatus.log | grep int | sed -e 's/(int)//'`
    79 
    80 case $check0 in
    81    1)   echo "check0=$check0 -> everything ok, got todo list -> build sequence entries" >> $scriptlog 2>&1;;
    82    *)   echo "check0=$check0 -> ERROR -> could not get todo list -> exit" >> $scriptlog 2>&1
    83         rm -v $todofile >> $scriptlog 2>&1
    84         rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
    85         date  >> $scriptlog 2>&1
    86         exit;;
    87 esac
     71getdolist  >> $scriptlog 2>&1
    8872
    8973# retrieve dates from todofile
     
    9276then
    9377   echo "nothing to do -> exit"  >> $scriptlog 2>&1
    94    rm -v $todofile >> $scriptlog 2>&1
    95    rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
    96    date  >> $scriptlog 2>&1
    97    exit
     78   finish >> $scriptlog 2>&1
    9879fi
    9980
     
    10788   buildsequentriespath=$logpath/$program/$year2
    10889   makedir  $buildsequentriespath >> $scriptlog 2>&1
     90   buildsequenceentrieslog=$buildsequentriespath/buildsequenceentries-$date.log
    10991
    11092   echo "run $program..." >> $scriptlog 2>&1
    11193   setstatus "start" >> $scriptlog 2>&1
    11294
    113    check1=`root -q -b $macrospath/buildsequenceentries.C+\("\"$date\""\,"\"$datapath\""\,"\"$sequpath\""\,kFALSE\) | tee $buildsequentriespath/buildsequenceentries-$date.log | grep int | sed -e 's/(int)//'`
     95   check1=`root -q -b $macrospath/buildsequenceentries.C+\("\"$date\""\,"\"$datapath\""\,"\"$sequpath\""\,kFALSE\) | tee $buildsequentrieslog | grep int | sed -e 's/(int)//'`
    11496
    11597   case $check1 in
     
    125107done
    126108
    127 rm -v $todofile >> $scriptlog 2>&1
    128 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
     109finish >> $scriptlog 2>&1
    129110
    130 set +C
    131 
    132 date  >> $scriptlog 2>&1
    133 
  • trunk/MagicSoft/Mars/datacenter/scripts/checkfilesforsequenceavail

    r7471 r7476  
    3737
    3838user=`whoami`
    39 program=checkfileavail
     39program=checkfilesavail
    4040source /home/$user/Mars/datacenter/scripts/sourcefile
    4141
    4242table=SequenceProcessStatus
    4343column=fAllFilesAvail
    44 date=NULL
    45 datetime=`date +%F-%H-%M-%S`
    46 year=`date +%Y`
    4744
    4845todofile=$listpath/ToDo-$table-$column.txt
    49 getstatuslogpath=$logpath/getstatus/$program/$year
    50 getstatuslog=$getstatuslogpath/getstatus-$table-$column-$datetime.log
     46lockfile=$lockpath/lock-$program.txt
    5147
    52 scriptlogpath=$logpath/run/checkfilesavail/`date +%Y/%m/%d`
     48scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d`
    5349makedir $scriptlogpath
    54 
    55 scriptlog=$scriptlogpath/checkfilesforsequenceavail-$datetime.log
     50scriptlog=$scriptlogpath/$program-$datetime.log
    5651
    5752date >> $scriptlog 2>&1
    58 
    59 makedir $getstatuslogpath >> $scriptlog 2>&1
    6053
    6154cd $mars
    6255
    6356# check if script is already running
    64 date > $lockpath/lock-$program.txt >> $scriptlog 2>&1
     57date > $lockfile >> $scriptlog 2>&1
    6558checklock0=$?
    6659case $checklock0 in
     
    7467
    7568# get todo list
    76 echo "getting list..." >> $scriptlog 2>&1
    77 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
    78 
    79 case $check0 in
    80    1)   echo "check0=$check0 -> everything ok -> do step" >> $scriptlog 2>&1 ;;
    81    *)   echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
    82         rm -v $todofile >> $scriptlog 2>&1
    83         rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
    84         date  >> $scriptlog 2>&1
    85         exit;;
    86 esac
     69getdolist  >> $scriptlog 2>&1
    8770
    8871# retrieve sequences from todofile
     
    9174then
    9275   echo "nothing to do -> exit"  >> $scriptlog 2>&1
    93    rm -v $todofile >> $scriptlog 2>&1
    94    rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
    95    date  >> $scriptlog 2>&1
    96    exit
     76   finish >> $scriptlog 2>&1
    9777fi
    9878
     
    10585   var1=$no
    10686   var2=$no2
    107    outpath=$logpath/$program/$no
    108    echo "outpath: "$outpath  >> $scriptlog 2>&1
     87   checkfileavailpath=$logpath/$program/$no
    10988   makedir $outpath  >> $scriptlog 2>&1
     89   checkfileavaillog=$checkfileavailpath/$program-$sequence.log
    11090   
    11191   sequencefile=$sequpath/$no/sequence$no2.txt
     
    11494   setstatus "start" >> $scriptlog 2>&1
    11595
    116    check1=`root -q -b $macrospath/checkfileavail.C+\(\""$sequencefile\""\) | tee $outpath/checkfileavail-$sequence.log | grep int | sed -e 's/(int)//'`
     96   check1=`root -q -b $macrospath/checkfileavail.C+\(\""$sequencefile\""\) | tee $checkfileavaillog | grep int | sed -e 's/(int)//'`
    11797
    11898   case $check1 in
     
    128108done
    129109
    130 rm -v $todofile  >> $scriptlog 2>&1
    131 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
     110finish >> $scriptlog 2>&1
    132111
    133 date  >> $scriptlog 2>&1
    134 
  • trunk/MagicSoft/Mars/datacenter/scripts/checkstardone

    r7471 r7476  
    4343table=DataSetProcessStatus
    4444column=fStarFilesAvail
    45 date=NULL
    46 datetime=`date +%F-%H-%M-%S`
    47 year=`date +%Y`
    4845
    4946todofile=$listpath/ToDo-$table-$column.txt
    50 getstatuslogpath=$logpath/getstatus/$program/$year
    51 getstatuslog=$getstatuslogpath/getstatus-$table-$column-$datetime.log
     47lockfile=$lockpath/lock-$program.txt
    5248
    5349scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d`
     
    5753date >> $scriptlog 2>&1
    5854
    59 makedir $getstatuslogpath >> $scriptlog 2>&1
    60 
    6155cd $mars
    6256
    6357# check if script is already running
    64 date > $lockpath/lock-$program.txt >> $scriptlog 2>&1
     58date > $lockfile >> $scriptlog 2>&1
    6559checklock0=$?
    6660case $checklock0 in
     
    7468
    7569# get todo list
    76 echo "getting list..." >> $scriptlog 2>&1
    77 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
    78 
    79 case $check0 in
    80    1)   echo "check0=$check0 -> everything ok -> do step" >> $scriptlog 2>&1 ;;
    81    *)   echo "check0=$check0 -> ERROR -> could not get list -> exit" >> $scriptlog 2>&1
    82         rm -v $todofile >> $scriptlog 2>&1
    83         rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
    84         date  >> $scriptlog 2>&1
    85         exit;;
    86 esac
     70getdolist  >> $scriptlog 2>&1
    8771
    8872datasets=(`cat $todofile`)
     
    9074then
    9175   echo "nothing to do -> exit"  >> $scriptlog 2>&1
    92    rm -v $todofile >> $scriptlog 2>&1
    93    rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
    94    date  >> $scriptlog 2>&1
    95    exit
     76   finish >> $scriptlog 2>&1
    9677fi
    9778
     
    142123done
    143124
    144 rm -v $todofile  >> $scriptlog 2>&1
    145 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
     125finish >> $scriptlog 2>&1
    146126
    147 date  >> $scriptlog 2>&1
    148 
  • trunk/MagicSoft/Mars/datacenter/scripts/copyscript

    r7460 r7476  
    6767char=28
    6868datetime=`date +%F-%H-%M-%S`
     69lockfile=$lockpath/lock-copyscript.txt
    6970
    7071scriptlogpath=$logpath/run/copyscript/`date +%Y/%m/%d`
     
    7677
    7778# check if the script is already running
    78 date > $lockpath/lock-copyscript.txt >> $scriptlog 2>&1
     79date > $lockfile >> $scriptlog 2>&1
    7980checklock0=$?
    8081case $checklock0 in
     
    9596then
    9697   echo "couldn't create checkfile -> exit script" >> $scriptlog 2>&1
    97    rm -v $lockpath/lock-copyscript.txt >> $scriptlog 2>&1
     98   rm -v $lockfile >> $scriptlog 2>&1
    9899   date  >> $scriptlog 2>&1
    99100   exit
     
    113114then
    114115   echo "nothing to do -> exit"  >> $scriptlog 2>&1
    115    rm -v $lockpath/lock-copyscript.txt >> $scriptlog 2>&1
     116   rm -v $lockfile >> $scriptlog 2>&1
    116117   date  >> $scriptlog 2>&1
    117118   exit
     
    292293
    293294
    294 rm -v $lockpath/lock-copyscript.txt >> $scriptlog 2>&1
     295rm -v $lockfile >> $scriptlog 2>&1
    295296date >> $scriptlog 2>&1
    296297
  • trunk/MagicSoft/Mars/datacenter/scripts/correcttime

    r7471 r7476  
    4444table=RunProcessStatus
    4545column=fTimingCorrection
    46 date=NULL
    47 datetime=`date +%F_%T`
    48 year=`date +%Y`
    4946
    50 getstatuslogpath=$logpath/getstatus/$program/$year
    51 getstatuslog=$getstatuslogpath/getstatus-$table-$column-$datetime.log
    52 makedir $getstatuslogpath >> $scriptlog 2>&1
     47todofile=$listpath/ToDo-$table-$column.txt
     48lockfile=$lockpath/lock-$program.txt
    5349
    54 if [ -e $listpath/ToDo-$table-$column.txt ]
     50if [ -e $todofile ]
    5551then
    5652   echo "$program is already running -> exit"
     
    6056cd $mars
    6157
    62 echo "getting list..."
    63 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
    64 
    65 case $check0 in
    66    1)   echo "check0=$check0 -> everything ok -> run $program";;
    67    *)   echo "check0=$check0 -> ERROR -> step has to be repeated";;
    68 esac
     58# get todo list
     59getdolist  >> $scriptlog 2>&1
    6960
    7061# retrieving runs from todo file
     
    7364then
    7465   echo "nothing to do -> exit"
    75    rm -v $listpath/ToDo-$table-$column.txt
    76    exit
     66   finish >> $scriptlog 2>&1
    7767fi
    7868
     
    114104done
    115105
    116 rm -v $listpath/ToDo-$table-$column.txt
     106finish >> $scriptlog 2>&1
    117107
  • trunk/MagicSoft/Mars/datacenter/scripts/dodatacheck

    r7471 r7476  
    5050table=RunProcessStatus
    5151column=fDataCheckDone
    52 date=NULL
    53 datetime=`date +%F-%H-%M-%S`
    54 year=`date +%Y`
    5552
    5653todofile=$listpath/ToDo-$table-$column
    57 getstatuslogpath=$logpath/getstatus/$program/$year
    58 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log
    5954
    6055scriptlogpath=$logpath/run/$program/`date +%Y/%m`
     
    6358
    6459date >> $scriptlog 2>&1
    65 
    66 makedir $getstatuslogpath >> $scriptlog 2>&1
    6760
    6861# check if there are already todo files
     
    8477   esac
    8578
    86    echo "getting list..." >> $scriptlog 2>&1
    87    check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
    88 
    89    case $check0 in
    90       1)   echo "check0=$check0 -> everything ok -> do $program" >> $scriptlog 2>&1;;
    91       *)   echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;;
    92    esac
     79   # get todo list
     80   getdolist  >> $scriptlog 2>&1
     81
    9382   rm -v $lockpath/lock-getting-$program-list.txt >> $scriptlog 2>&1
    9483fi
     
    133122then
    134123   echo "nothing to do -> exit"  >> $scriptlog 2>&1
    135    rm -v $todofile >> $scriptlog 2>&1
    136    rm -v $lockfile >> $scriptlog 2>&1
    137    date  >> $scriptlog 2>&1
    138    exit
     124   finish >> $scriptlog 2>&1
    139125fi
    140126
     
    227213   makedir $resetlogpath >> $scriptlog 2>&1
    228214   resetlog=$resetlogpath/reset-exclusions-$no2-$date2.log
    229    echo "setstatuslogfile: $setstatuslog" >> $scriptlog 2>&1
    230 
    231    check5=`root -q -b $macrospath/resetcolumn.C+\("\"fExclusionsDone\""\,"\"SequenceBuildStatus\""\,"\"$date2\""\,"\"$date2\""\,kFALSE\) | tee $setstatuslog | grep int | sed -e 's/(int)//'`
     215
     216   check5=`root -q -b $macrospath/resetcolumn.C+\("\"fExclusionsDone\""\,"\"SequenceBuildStatus\""\,"\"$date2\""\,"\"$date2\""\,kFALSE\) | tee $resetlog | grep int | sed -e 's/(int)//'`
    232217   case $check5 in
    233218      1)   echo "check5=$check5 -> everything ok, fExclusions have been reset " >> $scriptlog 2>&1
     
    248233   var1=$date
    249234   var2=$no2
    250    setstatus
     235   setstatus "stop" >> $scriptlog 2>&1
    251236done
    252237
    253 rm -v $todofile >> $scriptlog 2>&1
    254 rm -v $lockfile >> $scriptlog 2>&1
    255 
    256 set +C
    257 
    258 date  >> $scriptlog 2>&1
    259 
     238finish >> $scriptlog 2>&1
     239
  • trunk/MagicSoft/Mars/datacenter/scripts/doexclusions

    r7471 r7476  
    4646table=SequenceBuildStatus
    4747column=fExclusionsDone
    48 date=NULL
    49 datetime=`date +%F-%H-%M-%S`
    50 year=`date +%Y`
    5148
    5249todofile=$listpath/ToDo-$table-$column.txt
    53 getstatuslogpath=$logpath/getstatus/$program/$year
    54 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log
     50lockfile=$lockpath/lock-$program.txt
    5551
    5652scriptlogpath=$logpath/run/$program/`date +%Y/%m`
     
    6056date >> $scriptlog 2>&1
    6157
    62 makedir $getstatuslogpath >> $scriptlog 2>&1
    63 
    6458# check if the script is already running
    65 date > $lockpath/lock-$program.txt >> $scriptlog 2>&1
     59date > $lockfile >> $scriptlog 2>&1
    6660checklock0=$?
    6761case $checklock0 in
     
    7468esac
    7569
    76 # get the todo list
    77 echo "getting list..." >> $scriptlog 2>&1
    78 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
    79 
    80 case $check0 in
    81    1)   echo "check0=$check0 -> everything ok -> do step" >> $scriptlog 2>&1;;
    82    *)   echo "check0=$check0 -> ERROR -> could not get todo list -> exit" >> $scriptlog 2>&1
    83         rm -v $todofile >> $scriptlog 2>&1
    84         rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
    85         date  >> $scriptlog 2>&1
    86         exit;;
    87 esac
     70# get todo list
     71getdolist  >> $scriptlog 2>&1
    8872
    8973dates=(`cat $todofile`)
     
    9175then
    9276   echo "nothing to do -> exit"  >> $scriptlog 2>&1
    93    rm -v $todofile >> $scriptlog 2>&1
    94    rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
    95    date  >> $scriptlog 2>&1
    96    exit
     77   finish >> $scriptlog 2>&1
    9778fi
    9879
     
    10788   doexclusionspath=$logpath/$program/$year2
    10889   makedir $doexclusionspath >> $scriptlog 2>&1
     90   doexclusionslog=$doexclusionspath/doexclusions-$date.log
    10991
    11092   echo "run $program..." >> $scriptlog 2>&1
    11193   setstatus "start" >> $scriptlog 2>&1
    11294
    113    check1=`root -q -b $macrospath/doexclusions.C+\("\"$date\""\) | tee $doexclusionspath/doexclusions-$date.log | grep int | sed -e 's/(int)//'`
     95   check1=`root -q -b $macrospath/doexclusions.C+\("\"$date\""\) | tee $doexclusionslog | grep int | sed -e 's/(int)//'`
    11496
    11597   case $check1 in
     
    124106done
    125107
    126 rm -v $todofile >> $scriptlog 2>&1
    127 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
     108finish >> $scriptlog 2>&1
    128109
    129 set +C
    130 
    131 date  >> $scriptlog 2>&1
    132 
  • trunk/MagicSoft/Mars/datacenter/scripts/fillcallisto

    r7471 r7476  
    4545table=SequenceProcessStatus
    4646column=fFillCallisto
    47 date=NULL
    48 datetime=`date +%F-%H-%M-%S`
    49 year=`date +%Y`
    5047
    5148todofile=$listpath/ToDo-$table-$column.txt
    52 getstatuslogpath=$logpath/getstatus/$program/$year
    53 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log
     49lockfile=$lockpath/lock-$program.txt
    5450
    5551scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d`
     
    5955date >> $scriptlog 2>&1
    6056
    61 makedir $getstatuslogpath >> $scriptlog 2>&1
    62 
    6357cd $mars
    6458
    6559# check if the script is already running
    66 date > $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1
     60date > $lockfile >> $scriptlog 2>&1
    6761checklock0=$?
    6862case $checklock0 in
     
    7670
    7771# get todo file
    78 echo "getting list..." >> $scriptlog 2>&1
    79 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
    80 
    81 case $check0 in
    82     1)   echo "check0=$check0 -> everything ok -> run $program" >> $scriptlog 2>&1;;
    83     *)   echo "check0=$check0 -> ERROR -> could not get list -> exit" >> $scriptlog 2>&1
    84          rm -v $todofile >> $scriptlog 2>&1
    85          rm -v $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1
    86          date  >> $scriptlog 2>&1
    87          exit;;
    88 esac
     72getdolist  >> $scriptlog 2>&1
    8973
    9074sequences=(`cat $todofile`)
     
    9276then
    9377   echo "nothing to do -> exit"  >> $scriptlog 2>&1
    94    rm -v $todofile >> $scriptlog 2>&1
    95    rm -v $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1
    96    date  >> $scriptlog 2>&1
    97    exit
     78   finish >> $scriptlog 2>&1
    9879fi
    9980
     
    142123done
    143124
    144 rm -v $todofile >> $scriptlog 2>&1
    145 rm -v $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1
     125finish >> $scriptlog 2>&1
    146126
    147 set +C
    148 
    149 date  >> $scriptlog 2>&1
    150 
  • trunk/MagicSoft/Mars/datacenter/scripts/fillganymed

    r7471 r7476  
    4444table=DataSetProcessStatus
    4545column=fFillGanymed
    46 date=NULL
    47 datetime=`date +%F-%H-%M-%S`
    48 year=`date +%Y`
    4946
    5047todofile=$listpath/ToDo-$table-$column.txt
    51 getstatuslogpath=$logpath/getstatus/$program/$year
    52 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log
     48lockfile=$lockpath/lock-$program.txt
    5349
    5450scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d`
     
    5854date >> $scriptlog 2>&1
    5955
    60 makedir $getstatuslogpath >> $scriptlog 2>&1
    61 
    6256cd $mars
    6357
    6458# check if script is already running
    65 date > $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1
     59date > $lockfile >> $scriptlog 2>&1
    6660checklock0=$?
    6761case $checklock0 in
     
    7569
    7670# get todo list
    77 echo "getting list..." >> $scriptlog 2>&1
    78 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
    79 
    80 case $check0 in
    81     1)   echo "check0=$check0 -> everything ok -> run $program" >> $scriptlog 2>&1;;
    82     *)   echo "check0=$check0 -> ERROR -> could not get list -> exit" >> $scriptlog 2>&1
    83          rm -v $todofile >> $scriptlog 2>&1
    84          rm -v $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1
    85          date  >> $scriptlog 2>&1
    86          exit;;
    87 esac
     71getdolist  >> $scriptlog 2>&1
    8872
    8973# retrieve datasets from todo file
     
    9276then
    9377   echo "nothing to do -> exit"  >> $scriptlog 2>&1
    94    rm -v $todofile >> $scriptlog 2>&1
    95    rm -v $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1
    96    date  >> $scriptlog 2>&1
    97    exit
     78   finish >> $scriptlog 2>&1
    9879fi
    9980
     
    128109done
    129110
    130 rm -v $todofile >> $scriptlog 2>&1
    131 rm -v $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1
     111finish >> $scriptlog 2>&1
    132112
    133 set +C
    134 
    135 date  >> $scriptlog 2>&1
    136 
  • trunk/MagicSoft/Mars/datacenter/scripts/fillstar

    r7471 r7476  
    4444table=SequenceProcessStatus
    4545column=fFillStar
    46 date=NULL
    47 datetime=`date +%F-%H-%M-%S`
    48 year=`date +%Y`
    4946
    5047todofile=$listpath/ToDo-$table-$column.txt
    51 getstatuslogpath=$logpath/getstatus/$program/$year
    52 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log
     48lockfile=$lockpath/lock-$program.txt
    5349
    5450scriptlogpath=$logpath/run/$program/`date +%Y/%m/%d`
     
    5854date >> $scriptlog 2>&1
    5955
    60 makedir $getstatuslogpath >> $scriptlog 2>&1
    61 
    6256cd $mars
    6357
    6458# check if the script is already running
    65 date > $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1
     59date > $lockfile >> $scriptlog 2>&1
    6660checklock0=$?
    6761case $checklock0 in
     
    7569
    7670# get todo list
    77 echo "getting list..." >> $scriptlog 2>&1
    78 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'`
     71getdolist  >> $scriptlog 2>&1
    7972
    80 case $check0 in
    81     1)   echo "check0=$check0 -> everything ok -> run $program" >> $scriptlog 2>&1;;
    82     *)   echo "check0=$check0 -> ERROR -> could not get list -> exit" >> $scriptlog 2>&1
    83          rm -v $todofile >> $scriptlog 2>&1
    84          rm -v $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1
    85          date  >> $scriptlog 2>&1
    86          exit;;
    87 esac
    8873
    8974# retrieve sequences from todo file
     
    9277then
    9378   echo "nothing to do -> exit"  >> $scriptlog 2>&1
    94    rm -v $todofile >> $scriptlog 2>&1
    95    rm -v $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1
    96    date  >> $scriptlog 2>&1
    97    exit
     79   finish >> $scriptlog 2>&1
    9880fi
    9981
     
    128110done
    129111
    130 rm -v $todofile >> $scriptlog 2>&1
    131 rm -v $lockpath/lock-$table-$column.txt >> $scriptlog 2>&1
     112finish >> $scriptlog 2>&1
    132113
    133 set +C
    134 
    135 date  >> $scriptlog 2>&1
    136 
  • trunk/MagicSoft/Mars/datacenter/scripts/insertdatasets

    r7475 r7476  
    5353    0)   echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;;
    5454    1)   echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1
    55          echo "-> getting list for insertdatasets is running -> exit" >> $scriptlog 2>&1
     55         echo "-> insertdatasets is running -> exit" >> $scriptlog 2>&1
    5656         date  >> $scriptlog 2>&1
    5757         exit;;
  • trunk/MagicSoft/Mars/datacenter/scripts/makecallistolinks

    r7460 r7476  
    5454    0)   echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;;
    5555    1)   echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1
    56          echo "-> getting list for callisto is running -> exit" >> $scriptlog 2>&1
     56         echo "-> makecallistolinks is running -> exit" >> $scriptlog 2>&1
    5757         date  >> $scriptlog 2>&1
    5858         exit;;
Note: See TracChangeset for help on using the changeset viewer.