[GE users] Mail notification

reuti reuti at staff.uni-marburg.de
Thu Dec 11 14:26:22 GMT 2008

Am 11.12.2008 um 15:15 schrieb andreas:

> 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:"

Isn't the email sent after the job left the node, hence qstat won't  
find the job any longer?

In this case at least a mail could be sent from a queue or global  
epilog, but would also need the qstat. Maybe a new pseudo argument  
$args would be nice to expand to all given arguments.

-- Reuti

> 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'.
> Regards,
> Andreas
> http://gridengine.info/
> 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
> ------------------------------------------------------
> http://gridengine.sunsource.net/ds/viewMessage.do? 
> dsForumId=38&dsMessageId=92255
> To unsubscribe from this discussion, e-mail: [users- 
> unsubscribe at gridengine.sunsource.net].


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

More information about the gridengine-users mailing list