AnsweredAssumed Answered

Issue regarding Automic

Question asked by vikas_8434 on Sep 19, 2016
Latest reply on Sep 19, 2016 by vikas_8434
I have a issue where i need to check if a job does not runs at 2:30 am CST send an email , i wrote the following code (which i was planning to schedule by 2:30 am CST)

:SET &OBJECTNAME# = "JOB NAME "

:  SET &RunID# = GET_UC_OBJECT_NR(&OBJECTNAME#)
:  IF &RunID# <> ""
:  SET &OUT# = SEND_MAIL("EMAIl",,"SUB ","DATA")
:  PRINT &OBJECTNAME# event is already running with run ID &RunID#  with STATUS &STATUS#"
:  ELSE
:    PRINT &OBJECTNAME# event is not running at 2:30 am CST "
:  SET &OUT# = END_MAIL("EMAIl",,"SUB ","DATA")
:  ENDIF

Its not working fine , it shows me that the job is running with an even ID (i manually reran the job and it completed with 'ENDED OK ') status , but it still shows me that the event is running 

How can i fix it , what is the root cause ? 

NOTE : I am new to this forum , any help will be appreciated 

Thanks 
Vikas

Outcomes