cancel
Showing results for 
Search instead for 
Did you mean: 

Email Notification after Job run

Former Member
0 Kudos

Hi everybody,

I want to setup an email notification at the end of a job run.

The job is an update run from our Activate Directory and checks if there are some changes to do.

At the end or after this job I would like to send an email to the admin that the job successfully run and what the job did.

How could I setup this?

At the moment I tried to use a SQL statement to table MC_LOGS within a script called in the last pass of the job.

But I only get the information what to job do from the last run of the job and not from the current run.

Best regards & a happy new year, Anja

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Anja

Your last pass can only fetch information from the last run and not the current one because the Job is still running and the respective log is not yet written to the table.

But maybe you could use the LogFile created then the Job finishes.

I suppose you use the "LDAP (ADS) - Update All"- Job for LDAP-to-IC updates. This job writes a logfile to %$ddm.ddmpath% which you could send as mail attachment. Use the UpdateJob-"Event scheduling" button to run your SendMail-Job after every UpdateJob-completion.

Another idea would be to use the SQL-View MCMV_JOBLOG which I think is the datasource of IC-JobLog. I suppose column "mcmv_data" stores the details.

Hope I could help.

BR

Michael

Former Member
0 Kudos

Hi Michael,

thank you very much for your fast reply.

It took a while to found out the right way to configure the event scheduling.

I'm not sure if I choose the right pass for the script execution. I chose "Shell execute".

Best regards, Anja

Former Member
0 Kudos

Use a "To Generic" and put your script into Source-> "Initialization script".

As I think Shell execute is used for batch or executable files.

And another hint: uncheck "This question is answered" cause it will attract more readers and perhaps better answers

Answers (2)

Answers (2)

Former Member
0 Kudos

Depends on how you are doing this.

If it's a maintenance / recon job, you can add a pass with an email notification. There are examples if you use the pass wizard.

Otherwise you can create a task that does this as well.

basically the task will invoike the uSendSMTP function, it's well documented and easy to use.

Regards,

Matt

Former Member
0 Kudos

Hi Michael,

that's a good hint. I try this way ... and maybe anybody would have another solution ...

BR Anja

Edited by: Anja Wagenbret on Jan 5, 2010 3:02 PM