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

    r434 r437  
    230230    fi 
    231231 
    232     cat  << END_MAIL > job_end.mail 
     232    if ( ${ExitFlag} ) ; then 
     233        status=FAILED 
     234        cat  << END_MAIL > job_end.mail 
     235Dear ${LOGIN}, 
     236 
     237  Simulation ${config_UserChoices_JobName} failed on supercomputer `hostname`. 
     238  Job started : ${PeriodDateBegin} 
     239  Job ended   : ${PeriodDateEnd} 
     240  Output files are available in ${R_SAVE} 
     241  Script files, Script Outputs and Debug files are available in ${SUBMIT_DIR} 
     242END_MAIL 
     243    else 
     244        status=COMPLETED 
     245        cat  << END_MAIL > job_end.mail 
    233246Dear ${LOGIN}, 
    234247 
     
    239252  Script files and Script Outputs are available in ${SUBMIT_DIR} 
    240253END_MAIL 
     254    fi 
    241255 
    242256    if [ ! -z ${config_UserChoices_MailName} ] ; then 
    243         mailx -s "${config_UserChoices_JobName} completed" ${config_UserChoices_MailName} <  job_end.mail 
     257        mailx -s "${config_UserChoices_JobName} ${status}" ${config_UserChoices_MailName} <  job_end.mail 
    244258    elif [ -f ~/.forward ] ; then 
    245         mailx -s "${config_UserChoices_JobName} completed" $( cat ~/.forward ) < job_end.mail 
     259        mailx -s "${config_UserChoices_JobName} ${status}" $( cat ~/.forward ) < job_end.mail 
    246260    fi 
    247261 
Note: See TracChangeset for help on using the changeset viewer.