- Timestamp:
- 01/30/06 17:13:07 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/buildsequenceentries
r7460 r7465 37 37 38 38 user=`whoami` 39 program=buildsequenceentries 39 40 source /home/$user/Mars/datacenter/scripts/sourcefile 40 41 … … 50 51 51 52 todofile=$listpath/ToDo-$table-$column.txt 52 getstatuslogpath=$logpath/getstatus/ buildsequenceentries/$year53 getstatuslog=$getstatuslogpath/getstatus- buildsequenceentries-$datetime.log53 getstatuslogpath=$logpath/getstatus/$program/$year 54 getstatuslog=$getstatuslogpath/getstatus-$program-$datetime.log 54 55 55 scriptlogpath=$logpath/run/ buildsequenceentries/`date +%Y/%m`56 scriptlogpath=$logpath/run/$program/`date +%Y/%m` 56 57 makedir $scriptlogpath 57 scriptlog=$scriptlogpath/ buildsequenceentries-$datetime.log58 scriptlog=$scriptlogpath/$program-$datetime.log 58 59 59 60 date >> $scriptlog 2>&1 … … 62 63 63 64 # check if script is already running 64 date > $lockpath/lock- buildsequenceentries.txt >> $scriptlog 2>&165 date > $lockpath/lock-$program.txt >> $scriptlog 2>&1 65 66 checklock0=$? 66 67 case $checklock0 in 67 68 0) echo "checklock0=$checklock0 -> continue " >> $scriptlog 2>&1;; 68 69 1) echo "checklock0=$checklock0 -> file exists " >> $scriptlog 2>&1 69 echo "-> buildsequenceentriesis running -> exit" >> $scriptlog 2>&170 echo "-> $program is running -> exit" >> $scriptlog 2>&1 70 71 date >> $scriptlog 2>&1 71 72 exit;; … … 81 82 *) echo "check0=$check0 -> ERROR -> could not get todo list -> exit" >> $scriptlog 2>&1 82 83 rm -v $todofile >> $scriptlog 2>&1 83 rm -v $lockpath/lock- buildsequenceentries.txt >> $scriptlog 2>&184 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 84 85 date >> $scriptlog 2>&1 85 86 exit;; … … 92 93 echo "nothing to do -> exit" >> $scriptlog 2>&1 93 94 rm -v $todofile >> $scriptlog 2>&1 94 rm -v $lockpath/lock- buildsequenceentries.txt >> $scriptlog 2>&195 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 95 96 date >> $scriptlog 2>&1 96 97 exit … … 102 103 echo "building sequence entries for date $date..." >> $scriptlog 2>&1 103 104 year2=`echo $date | cut -c 1-4` 104 buildsequentriespath=$logpath/ buildsequenceentries/$year2105 buildsequentriespath=$logpath/$program/$year2 105 106 makedir $buildsequentriespath >> $scriptlog 2>&1 106 107 … … 109 110 case $check1 in 110 111 1) echo "check1=$check1 -> everything ok -> setting status for $date..." >> $scriptlog 2>&1 111 setstatuslogpath=$logpath/setstatus/buildsequenceentries/$year2 112 makedir $setstatuslogpath >> $scriptlog 2>&1 113 114 check2=`root -q -b $macrospath/setstatus.C+\("\"$date\""\,"\"$table\""\,"\"$column\""\,"\"Now()\""\) | tee $setstatuslogpath/setstatus-buildsequenceentries-$date.log | grep int | sed -e 's/(int)//'` 115 case $check2 in 116 1) echo "check2=$check2 -> everything ok, status has been set" >> $scriptlog 2>&1;; 117 *) echo "check2=$check2 -> ERROR -> step could not be set for $date" >> $scriptlog 2>&1;; 118 esac 112 statustime="Now()" 113 failed="NULL" 114 starttime="NULL" 115 failedtime="NULL" 116 var1=$year2 117 var2=$date 118 setstatus 119 119 ;; 120 *) echo "check1=$check1 -> ERROR - buildsequenceentries.C failed for $date -> step has to be repeated" >> $scriptlog 2>&1;;120 *) echo "check1=$check1 -> ERROR - $program.C failed for $date -> step has to be repeated" >> $scriptlog 2>&1;; 121 121 esac 122 122 done 123 123 124 124 rm -v $todofile >> $scriptlog 2>&1 125 rm -v $lockpath/lock- buildsequenceentries.txt >> $scriptlog 2>&1125 rm -v $lockpath/lock-$program.txt >> $scriptlog 2>&1 126 126 127 127 set +C
Note:
See TracChangeset
for help on using the changeset viewer.