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_default.ksh

    r434 r437  
    214214    fi 
    215215 
    216     cat  << END_MAIL > job_end.mail 
     216    if ( ${ExitFlag} ) ; then 
     217        status=FAILED 
     218        cat  << END_MAIL > job_end.mail 
     219Dear ${LOGIN}, 
     220 
     221  Simulation ${config_UserChoices_JobName} failed on supercomputer `hostname`. 
     222  Job started : ${PeriodDateBegin} 
     223  Job ended   : ${PeriodDateEnd} 
     224  Output files are available in ${R_SAVE} 
     225  Script files, Script Outputs and Debug files are available in ${SUBMIT_DIR} 
     226END_MAIL 
     227    else 
     228        status=COMPLETED 
     229        cat  << END_MAIL > job_end.mail 
    217230Dear ${LOGIN}, 
    218231 
     
    223236  Script files and Script Outputs are available in ${SUBMIT_DIR} 
    224237END_MAIL 
     238    fi 
    225239 
    226240    if [ ! -z ${config_UserChoices_MailName} ] ; then 
    227         mailx -s "${config_UserChoices_JobName} completed" ${config_UserChoices_MailName} <  job_end.mail 
     241        mailx -s "${config_UserChoices_JobName} ${status}" ${config_UserChoices_MailName} <  job_end.mail 
    228242    elif [ -f ~/.forward ] ; then 
    229         mailx -s "${config_UserChoices_JobName} completed" $( cat ~/.forward ) < job_end.mail 
     243        mailx -s "${config_UserChoices_JobName} ${status}" $( cat ~/.forward ) < job_end.mail 
    230244    fi 
    231245 
Note: See TracChangeset for help on using the changeset viewer.