Dat_Nguyen-Tat_9196

Get email before and after a job start

Discussion created by Dat_Nguyen-Tat_9196 on Jul 20, 2017
Latest reply on Jul 20, 2017 by Wolfgang_Brueckler_1288
Your Question
I would like to know, how to retrieve batch's start time, end time and runtime in an email. I tried adding predefined variables in pre-process and post-process tab of job. But that doesn't work. It popped out like "OPERATOR can only be allowed in NOTIFICATION object". 

Requirement: When a job start from Uc4, an email should be sent embedding its BATCH_NAME, START_TIME along with DATE. Likewise, when a job ends, an email should be sent with mail body having BATCH_NAME, START_TIME, END_TIME and RUNTIME along with DATE. Mail Subject - BATCH STATUS.

Our Answer
You can create a NOTIFICATION Object and activate it in Pre-process and Post-procest tab by ACTIVATE_UC_OBJECT function:

:SET &ACTOBJ# = ACTIVATE_UC_OBJECT("your notification object name",,,,,PASS_VALUES)

pu7r24n9qqxm.jpg
FYI: 
If you want to send email from AE system, you need to configure the UC_CLIENT_SETTING, please check the reference links for more detail.

Reference links:
https://docs.automic.com/documentation/webhelp/english/AWA/12.0/DOCU/12.0/AWA%20Guides/help.htm#AWA/Objects/obj_notifications.htm%3FTocPath%3DUser%2520Guide%7CProcess%2520Assembly%2520Perspective%7CDefining%2520Objects%7CNotification%7C_____0
https://docs.automic.com/documentation/webhelp/english/AWA/12.0/DOCU/12.0/AWA%20Guides/help.htm#AWA/Admin/admin_UC_CLIENT_SETTINGS.htm
https://docs.automic.com/documentation/webhelp/english/AWA/12.0/DOCU/12.0/AWA%20Guides/help.htm#AE_AWA_Source/Script/ucaafh.htm%3FTocPath%3DAutomic%2520Scripting%2520Guide%7COrdered%2520by%2520Function%7CActivate%2520Objects%7C_____5

Outcomes