Queue Manager emailing when jobs run

From wiki
Jump to: navigation, search

You have four options to make it email you:

1) Add the commands to your shell script at the top:

#$ -m e
#$ -M youmail@st-andrews.ac.uk

2) Add to your .bash_profile ( add these two lines to it so you never have to do it again. A bit dangerous if you have lots of jobs!!)

nano .bash_profile
# alias so I get emails when job are done.
alias qsub='qsub -m e -M youremail@st-andrews.ac.uk'

3) add it to the command line when you qsub a job

qsub -V -m e -M whatever@st-andrews.ac.uk  shellscript.sh

4) ignore it altogether.


Email can be sent in the following situations:

      -m b|e|a|s|n,...
             Defines  or  redefines  under which circumstances mail is to be sent to the job owner or to the users defined
             with the -M option described below. The option arguments have the following meaning:
             ‘b’     Mail is sent at the beginning of the job.
             ‘e’     Mail is sent at the end of the job.
             ‘a’     Mail is sent when the job is aborted or
                     rescheduled.
             ‘s’     Mail is sent when the job is suspended.
             ‘n’     No mail is sent.
      -M user[@host],...