Index: issm/trunk/cron/configs/linux64_morlighem
===================================================================
--- issm/trunk/cron/configs/linux64_morlighem	(revision 1561)
+++ issm/trunk/cron/configs/linux64_morlighem	(revision 1562)
@@ -2,6 +2,6 @@
 REPOSITORY="http://s383-rhat/issm/svn/issm/trunk"
 
-#email adress to send Cron report
-EMAIL_ADRESS="mathieu.morlighem@jpl.nasa.gov"
+#email adress from which the html report will be sent
+EMAIL_ADRESS=mathieu.morlighem@jpl.nasa.gov
 
 
Index: issm/trunk/cron/configs/macosx32_morlighem
===================================================================
--- issm/trunk/cron/configs/macosx32_morlighem	(revision 1561)
+++ issm/trunk/cron/configs/macosx32_morlighem	(revision 1562)
@@ -2,6 +2,6 @@
 REPOSITORY="http://s383-rhat/issm/svn/issm/trunk"
 
-#email adress to send Cron report
-EMAIL_ADRESS="helene.seroussi@jpl.nasa.gov"
+#email adress from which the html report will be sent
+EMAIL_ADRESS=helene.seroussi@jpl.nasa.gov
 
 #ISSM directory
Index: issm/trunk/cron/configs/macosx32_seroussi
===================================================================
--- issm/trunk/cron/configs/macosx32_seroussi	(revision 1561)
+++ issm/trunk/cron/configs/macosx32_seroussi	(revision 1562)
@@ -2,6 +2,6 @@
 REPOSITORY="http://s383-rhat/issm/svn/issm/trunk"
 
-#email adress to send Cron report
-EMAIL_ADRESS="helene.seroussi@jpl.nasa.gov"
+#email adress from which the html report will be sent
+EMAIL_ADRESS=helene.seroussi@jpl.nasa.gov
 
 #ISSM directory
Index: issm/trunk/cron/configs/win32xp_larour
===================================================================
--- issm/trunk/cron/configs/win32xp_larour	(revision 1561)
+++ issm/trunk/cron/configs/win32xp_larour	(revision 1562)
@@ -2,6 +2,6 @@
 REPOSITORY="http://s383-rhat/issm/svn/issm/trunk"
 
-#email adress to send Cron report
-EMAIL_ADRESS="eric.larour@jpl.nasa.gov"
+#email adress from which the html report will be sent
+EMAIL_ADRESS=eric.larour@jpl.nasa.gov
 
 #ISSM directory
Index: issm/trunk/cron/nightlyrun.sh
===================================================================
--- issm/trunk/cron/nightlyrun.sh	(revision 1561)
+++ issm/trunk/cron/nightlyrun.sh	(revision 1562)
@@ -6,19 +6,41 @@
 if [ $# -ne 1 ];
 then
+	#no config file specified: exit
 	echo "no config file specified. Exiting..."
 	exit 1
 else
+	#launch nightly run (get start time)
 	source $1;
+	START=$(timer)
 fi
 
+#some functions
+function timer()
+{
+	if [[ $# -eq 0 ]]; then
+		echo $(date '+%s')
+	else
+		local  stime=$1
+		etime=$(date '+%s')
+
+		if [[ -z "$stime" ]]; then stime=$etime; fi
+
+		dt=$((etime - stime))
+		ds=$((dt % 60))
+		dm=$(((dt / 60) % 60))
+		dh=$((dt / 3600))
+		printf '%d:%02d:%02d' $dh $dm $ds
+	fi
+}
+function todaydate()
+{
+	export today=`date | awk '{printf("%s-%s-%s",$2,$3,$6);}'`; 
+	suffix=`date | awk '{printf("%s-%s-%s",$2,$3,$6);}'`			 
+	echo $suffix;			 
+} 
+
 #create nightly run variables
-export TODAY=`date | awk '{printf("%s-%s-%s",$2,$3,$6);}'`;
+export TODAY=$(todaydate);
 export HOST_NAME=`hostname`;
-if [[ "$OS" == "winxp32" ]]
-then
-	export HOST_NAME_SHORT=`hostname`;
-else
-	export HOST_NAME_SHORT=`hostname -s`;
-fi
 export ISSM_RELEASE="issm"
 
@@ -43,5 +65,5 @@
 cat << END > cluster.rc
 begin
-cluster_name=$HOST_NAME_SHORT
+cluster_name=$HOST_NAME
 cluster_codepath=$ISSM_DIR/bin
 cluster_executionpath=$EXECUTION_PATH
@@ -83,4 +105,5 @@
 
 #Build html report
+export ELAPSEDTIME=$(timer $START)
 ./cron/report.sh
 		
@@ -91,10 +114,10 @@
 if [[ "$OS" == "winxp32" ]]
 then
-	email -html -f "ISSM Nightly run $EMAIL_ADRESS" -s "Nightly runs of $ISSM_RELEASE on: $HOST_NAME. Date:$TODAY. " $i < report.html 
+	email -html -f "ISSM Nightly run $EMAIL_ADRESS" -s "Nightly runs of $ISSM_RELEASE OS: $OS. " $i < report.html 
 else
 	cat - report.html <<HERE | /usr/lib/sendmail  -oi -t
-From: "ISSM Nightly run" $EMAIL_ADRESS
+From: "ISSM Nightly run" <$EMAIL_ADRESS>
 To: $i
-Subject: Nightly runs of $ISSM_RELEASE on: $HOST_NAME_SHORT. Date:$TODAY.
+Subject: Nightly runs of $ISSM_RELEASE OS: $OS.
 Mime-Version: 1.0
 Content-Type: text/html
Index: issm/trunk/cron/report.sh
===================================================================
--- issm/trunk/cron/report.sh	(revision 1561)
+++ issm/trunk/cron/report.sh	(revision 1562)
@@ -83,4 +83,5 @@
 platform: $ISSM_ARCH<br>
 release: $ISSM_RELEASE<br>
+elapsed time: $ELAPSEDTIME<br>
 <br>
 status: $(if [ `wc -l check.log | awk '{printf("%s",$1);}'`  = "0" ];
