Changeset 882
- Timestamp:
- 06/10/09 14:09:57 (16 years ago)
- Location:
- issm/trunk/cron
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/cron/nightlyrun.sh
r752 r882 61 61 cd .. 62 62 63 #Figure out mailing list64 source cron/mailinglist65 66 63 #Launch matlab and the nightly run script 67 64 matlab -nodisplay > ./nightly.log << EOF … … 70 67 EOF 71 68 72 #Process log for errors 73 cat nightly.log | grep ERROR > errors1.log 74 cat nightly.log | grep SUCCESS > errors2.log 75 cat nightly.log | grep NIGHTLYRUNTERMINATEDCORRECTLY > check.log 76 cat errors1.log errors2.log > errors.log 69 #Build html report 70 sh report.sh 77 71 78 #Mail 79 ERRORS=`cat errors.log` 80 CHECK=`cat check.log` 81 82 #1: no result -> did not work 83 if [ `expr length "$ERRORS"` = "0" ]; then 84 for i in `echo $MAILINGLIST` 85 do 86 mail -s "Nightly runs of $ISSM_RELEASE on: $host_name. Date:$today. DID NOT WORK CORRECTLY" $i < nightly.log 87 done 88 else 89 90 #2: nightly run stopped before the end 91 if [ `expr length "$CHECK"` = "0" ]; then 92 for i in `echo $MAILINGLIST` 93 do 94 mail -s "Nightly runs of $ISSM_RELEASE on: $host_name. Date:$today. STOPPED BEFORE THE END" $i < errors.log 95 done 96 97 #3: everything worked 98 else 99 for i in `echo $MAILINGLIST` 100 do 101 mail -s "Nightly runs of $ISSM_RELEASE on: $host_name. Date:$today." $i < errors.log 102 done 103 fi 104 fi 72 #send mail 73 source cron/mailinglist 74 for i in `echo $MAILINGLIST`; do 75 cat - report.html <<HERE | /usr/lib/sendmail -oi -t 76 From: morlighe@wilkes.jpl.nasa.gov 77 To: $i 78 Subject: Nightly runs of $ISSM_RELEASE on: $host_name. Date:$today. 79 Mime-Version: 1.0 80 Content-Type: text/html 81 HERE 82 done 105 83 106 84 #Erase log and error logs 107 rm -rf nightly.log errors1.log errors2.log errors.log check.log85 #rm -rf nightly.log 108 86 109 87 #Erase ice code 110 cd ..111 rm -rf trunk/88 #cd .. 89 #rm -rf trunk/
Note:
See TracChangeset
for help on using the changeset viewer.