Ignore:
Timestamp:
01/30/06 17:13:07 (19 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r7460 r7465  
    3737
    3838user=`whoami`
     39program=checkfileavail
    3940source /home/$user/Mars/datacenter/scripts/sourcefile
    4041
     
    4647
    4748todofile=$listpath/ToDo-$table-$column.txt
    48 getstatuslogpath=$logpath/getstatus/checkfileavail/$year
     49getstatuslogpath=$logpath/getstatus/$program/$year
    4950getstatuslog=$getstatuslogpath/getstatus-$table-$column-$datetime.log
    5051
     
    6162
    6263# check if script is already running
    63 date > $lockpath/lock-checkfileavail.txt >> $scriptlog 2>&1
     64date > $lockpath/lock-$program.txt >> $scriptlog 2>&1
    6465checklock0=$?
    6566case $checklock0 in
    6667    0)   echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;;
    6768    1)   echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1
    68          echo "-> checkfileavail is running -> exit" >> $scriptlog 2>&1
     69         echo "-> $program is running -> exit" >> $scriptlog 2>&1
    6970         date  >> $scriptlog 2>&1
    7071         exit;;
     
    8081   *)   echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
    8182        rm -v $todofile >> $scriptlog 2>&1
    82         rm -v $lockpath/lock-checkfileavail.txt >> $scriptlog 2>&1
     83        rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
    8384        date  >> $scriptlog 2>&1
    8485        exit;;
     
    9192   echo "nothing to do -> exit"  >> $scriptlog 2>&1
    9293   rm -v $todofile >> $scriptlog 2>&1
    93    rm -v $lockpath/lock-checkfileavail.txt >> $scriptlog 2>&1
     94   rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
    9495   date  >> $scriptlog 2>&1
    9596   exit
     
    102103   no=`printf %08d $sequence | cut -c 0-4`
    103104   no2=`printf %08d $sequence`
    104    outpath=$logpath/checkfileavail/$no
     105   outpath=$logpath/$program/$no
    105106   echo "outpath: "$outpath  >> $scriptlog 2>&1
    106107   makedir $outpath  >> $scriptlog 2>&1
     
    112113   case $check1 in
    113114      1)   echo "check1=$check1 -> everything ok -> setting status..." >> $scriptlog 2>&1
    114            setstatuslogpath=$logpath/setstatus/checkfileavail/$no
    115            makedir $setstatuslogpath  >> $scriptlog 2>&1
    116 
    117            check2=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\)  | tee $setstatuslogpath/setstatus-checkfileavail-$sequence.log | grep int | sed -e 's/(int)//'`
    118            case $check2 in
    119               1)   echo "check2=$check2 -> everything ok, status has been set" >> $scriptlog 2>&1 ;;
    120               *)   echo "check2=$check2 -> ERROR -> step could not be set" >> $scriptlog 2>&1 ;;
    121            esac
     115           statustime="Now()"
     116           failed="NULL"
     117           starttime="NULL"
     118           failedtime="NULL"
     119           var1=$no
     120           var2=$sequence
     121           setstatus
    122122           ;;
    123123      *)   echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 ;;
     
    126126
    127127rm -v $todofile  >> $scriptlog 2>&1
    128 rm -v $lockpath/lock-checkfileavail.txt >> $scriptlog 2>&1
     128rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1
    129129
    130130date  >> $scriptlog 2>&1
Note: See TracChangeset for help on using the changeset viewer.