Ignore:
Timestamp:
04/06/11 17:16:38 (13 years ago)
Author:
sdipsl
Message:

Send mail notification when computing job stops
It could be that we send a notification if a post-processing job stops in PROD mode ---> need some refactoring and caution...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_platine.ksh

    r434 r437  
    224224       echo "IGCM_sys_SendMail :" $@ 
    225225    fi 
    226     cat  << END_MAIL > job_end.mail 
     226 
     227    if ( ${ExitFlag} ) ; then 
     228        status=FAILED 
     229        cat  << END_MAIL > job_end.mail 
     230Dear ${LOGIN}, 
     231 
     232  Simulation ${config_UserChoices_JobName} failed on supercomputer `hostname`. 
     233  Job started : ${PeriodDateBegin} 
     234  Job ended   : ${PeriodDateEnd} 
     235  Output files are available in ${R_SAVE} 
     236  Script files, Script Outputs and Debug files are available in ${SUBMIT_DIR} 
     237END_MAIL 
     238    else 
     239        status=COMPLETED 
     240        cat  << END_MAIL > job_end.mail 
    227241Dear ${LOGIN}, 
    228242 
     
    233247  Script files and Script Outputs are available in ${SUBMIT_DIR} 
    234248END_MAIL 
     249    fi 
    235250 
    236251    if [ ! -z ${config_UserChoices_MailName} ] ; then 
    237         mailx -s "${config_UserChoices_JobName} completed" ${config_UserChoices_MailName} < job_end.mail 
     252        mailx -s "${config_UserChoices_JobName} ${status}" ${config_UserChoices_MailName} < job_end.mail 
    238253    elif [ -f ~/.forward ] ; then 
    239         mailx -s "${config_UserChoices_JobName} completed" $( cat ~/.forward ) < job_end.mail 
     254        mailx -s "${config_UserChoices_JobName} ${status}" $( cat ~/.forward ) < job_end.mail 
    240255    fi 
    241256 
Note: See TracChangeset for help on using the changeset viewer.