cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1348
Views
0
Helpful
4
Replies

custom event triggers to e-mail when job copletes normally on re-run

tidal experts - I've been using tidal for last 6 months. We have a requirement to send e-mails when job completes normally on re-run. Can any one please advice? Thanks in advance!

scenario - when a job completes abnormally, some operator look into issue and may re-start the same job. If the job completes successfully on re-run, only then an e-mail alert should be sent to distribution.  

4 Replies 4

Derrick Au
Level 4
Level 4

Hi praveen,

 

There is no out of the box solution that will allow you send email notification on successful re-runs only. Because it would have to use Job Event: Job completed normally, but you can add details to the email action to include job variables: start and end times, and you may also add a counter variable to indicate how many times the job has run.

 

BR,

Derrick Au

Thank you Derrick and Tyler, both the solutions resolve the issue. But my tidal environment has too many jobs and job completion emails would flood the mailbox.

To be specific to my instances, I think passing on the "counter" variable (number of re-runs) to the script would be good idea as we could handle it in script.

I couldn't find counter variable in my 5.3.1 version. Can you please let me know the specific name and also how to get there? Thanks a lot!

Hi praveen,

 

There's quite a bit of work involved when scripting in a variable, value pair. It would be an external variable passed into a job group level, then passed to the job level. Then from job level you can use set a local Tidal variable to initialize value, and increment local Tidal variable by 1 for each subsequent runs.

 

Another way is to perform a SQL query on the Admiral database. The job reruns column (jobrun table, jobrun_reruns). If this number is >= 1 then send out an email notification. Either way requires a bit of programmatic effort.

 

BR,

Derrick Au

 

 

Tyler Theobald
Level 1
Level 1

Agree with Derrick.  What we've done when you want different job event behavior between runs, is to literally have 2 separate jobs defs, and name one (rerun) with the job event/email action for completed normally. 

Since you have an operator interacting with your scenario, that makes it perfect for him to rerun the (rerun) job and not the original job that completed abnormally. 

Review Cisco Networking for a $25 gift card