Reply
Highlighted
New Contributor
Posts: 2
Registered: ‎07-25-2016

How to send job status through Oozie Mail?

I am creating a oozie workflow, where it has to trigger an automatic mail once the job is completed with the details of the job and the job status.

 

In short, I need the ouput of this command ---> oozie job -oozie {SERVER_DETAILS} -info ${job_id} in the oozie mail to be sent via mail.

 

When I try this,

<action name="an-email"> 
<email xmlns="uri:oozie:email-action:0.1">
<to></to> <cc></cc> 
<subject>Email notifications for ${wf:id()}</subject> 
<body>The wf ${wf:id()} successfully completed.</body> </email> 
<ok to="myotherjob"/> 
<error to="errorcleanup"/> 
</action>

 

I am just able to mail the job id alone, but I need to include the job status and execution time.