[GE users] Mail notification

andreas andreas.haas at sun.com
Thu Dec 11 14:15:54 GMT 2008

On Wed, 10 Dec 2008, bilhanb at hotmail.com wrote:

> Hello,
> How can I customize the email notification in SGE? I would like the email subject line (or email body) to contain the job arguments. For example when I submit a job like this:
> # qsub runjob.sh inputfile.dat
> I get an e-mail with subject line:
> Job 1274 (runjob.sh) Complete
> I would like it to be like this:
> Job 1274 (runjob.sh inputfile.dat) Complete

Not actually trivial, but doable:

You write a script wrapper for what you are using as 'mailer' in sge_conf(5) in
a way that it mimics any input/output of this mailer. In order to get
the job arguments into the subject line you must at first extract the job 
ID from the string passed as argument to -s "subject" so that you can 
retrieve the jobs' arguments using

    # qstat -j <jobid> | grep "^job_args:"

and then you exec the actual mailer with an adujsted -s "subject".

When you got this wrapper to work you can configure it as 'mailer'.



Sitz der Gesellschaft: Sun Microsystems GmbH, Sonnenallee 1, D-85551 Kirchheim-Heimstetten
Amtsgericht Muenchen: HRB 161028
Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer
Vorsitzender des Aufsichtsrates: Martin Haering


To unsubscribe from this discussion, e-mail: [users-unsubscribe at gridengine.sunsource.net].

More information about the gridengine-users mailing list