Automic Workload Automation

 View Only

  • 1.  How to check if an object(job) with a specific run id is active?

    Posted Jul 26, 2024 09:36 AM

    We want to trigger a notification if a job exceeds a certain threshold. And the notification will keep triggering every 5 minutes till the job with that run id is active.  But I am not able to find a variable which checks for the status of the job with a specific run id. Is there a ready made solution available or will I have to write a script?



    ------------------------------
    Thanks,
    Kumar
    ------------------------------


  • 2.  RE: How to check if an object(job) with a specific run id is active?

    Posted Jul 26, 2024 10:34 AM

    Hi Kumar,

    If I get your question right, the easiest method ("out of the box") is to use the maximum runtime supervision in the JOBS tab General/Runtime.

    If you still want to use AE script to query the status then use GET_UC_OBJECT_NR (Object Name)in combination with GET_UC_OBJECT_STATUS

    regards,
    Peter



    ------------------------------
    Automic Certified Professional/Expert & Broadcom Knight

    For AUTOMIC trainings please check https://www.qskills.de/qs/workshops/automic/
    ------------------------------



  • 3.  RE: How to check if an object(job) with a specific run id is active?

    Posted Jul 26, 2024 10:40 AM

    Thank you Peter for your response. I am aware of the Max Runtime option and we use it to trigger a notification when the set threshold is reached. But we want to keep sending out reminders every few minutes till that job instance is active. Even if the next instance gets triggered and is running in parallel to the existing instance, we want to monitor the existing instance and keep sending the reminders. 




  • 4.  RE: How to check if an object(job) with a specific run id is active?
    Best Answer

    Posted Jul 26, 2024 11:00 AM

    OK - I see.

    You're talking about parallel executions. Therefore I would use this mechanism:

    1. at start, the JOBS stores his own run number in a VARA object
    2. the monitoring mechanism periodically reads the run ids and runs GET_UC_OBJECT_STATUS to retrieve the status and send out reminders
    3. if the JOBS ends, the own run id will be deleted in Post Processing.

    Alternatively you could use a SQL query (select EH_AH_Idnr from EH where EH_Name = '<JOBS name>' and EH_Client = <client nr.> and EH_Status = 1550) to retrieve the run Ids and pass it to the reminder object.

    regards,
    Peter



    ------------------------------
    Automic Certified Professional/Expert & Broadcom Knight

    For AUTOMIC trainings please check https://www.qskills.de/qs/workshops/automic/
    ------------------------------