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

    r434 r437  
    183183    fi 
    184184 
    185     cat  << END_MAIL > job_end.mail 
     185    if ( ${ExitFlag} ) ; then 
     186        status=FAILED 
     187        cat  << END_MAIL > job_end.mail 
     188Dear ${LOGIN}, 
     189 
     190  Simulation ${config_UserChoices_JobName} failed on supercomputer `hostname`. 
     191  Job started : ${PeriodDateBegin} 
     192  Job ended   : ${PeriodDateEnd} 
     193  Output files are available in ${R_SAVE} 
     194  Script files, Script Outputs and Debug files are available in ${SUBMIT_DIR} 
     195END_MAIL 
     196    else 
     197        status=COMPLETED 
     198        cat  << END_MAIL > job_end.mail 
    186199Dear ${LOGIN}, 
    187200 
     
    193206END_MAIL 
    194207 
     208    fi 
     209 
    195210    if [ X${config_UserChoices_MailName} != X ] ; then 
    196         mailx -s "${config_UserChoices_JobName} completed" ${config_UserChoices_MailName} <  job_end.mail 
     211        mailx -s "${config_UserChoices_JobName} ${status}" ${config_UserChoices_MailName} <  job_end.mail 
    197212    elif [ -f ~/.forward ] ; then 
    198         mailx -s "${config_UserChoices_JobName} completed" $( cat ~/.forward ) < job_end.mail 
     213        mailx -s "${config_UserChoices_JobName} ${status}" $( cat ~/.forward ) < job_end.mail 
    199214    else 
    200         mailx -s "${config_UserChoices_JobName} completed" ${USER} < job_end.mail 
     215        mailx -s "${config_UserChoices_JobName} ${status}" ${USER} < job_end.mail 
    201216    fi 
    202217 
Note: See TracChangeset for help on using the changeset viewer.