Automic Workload Automation

Expand all | Collapse all

How to monitor and cancel jobs which are stopped in state "Post-processing"

Jump to Best Answer
  • 1.  How to monitor and cancel jobs which are stopped in state "Post-processing"

    Posted 10-31-2019 03:10 PM
    Hello folks,

    Please, could you give me an idea how to monitor and cancel jobs which are stopped in state "Post-processing"?

    I first thought to use a GET_UC_OBJECT_STATUS in a include for all the objects.
    But the script is not correctly handling this status in special.

    Any other idea?

    Thanks!
    Rodrigo


  • 2.  RE: How to monitor and cancel jobs which are stopped in state "Post-processing"

    Posted 10-31-2019 04:35 PM
    Hi

    You can try GET_STATISTIC_DETAIL with Parameter STATUS

    https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/12.3/Automic%20Automation%20Guides/help.htm#Script/Reference/GET_STATISTIC_DETAIL.htm?Highlight=get_statistic_detail

    cheers, Wolfgang

    ------------------------------
    I know I do really know it!
    ------------------------------



  • 3.  RE: How to monitor and cancel jobs which are stopped in state "Post-processing"
    Best Answer

    Posted 11-01-2019 09:36 AM
    Hi Rodrigo,

    It's also possible to query the DB with a SQLI vara, if you have the DB_SERVICE installed. It will work as well.

    ------------------------------
    Automic Services Delivery Manager
    MVR Informática
    ------------------------------



  • 4.  RE: How to monitor and cancel jobs which are stopped in state "Post-processing"

    Posted 9 days ago
    Hello Simone,
    Thanks for the answer! Sorry for the very late reply.
    I tried this but I could not find a EH table where this info is provided.
    EH_ERT provides only the runtime in general.

    https://docs.automic.com/documentation/webhelp/english/AWA/11.2/AE/11.2/DB%20Schema/db/_structure/HTML/EH.html


  • 5.  RE: How to monitor and cancel jobs which are stopped in state "Post-processing"

    Posted 8 days ago
    Hi Rodrigo,

    with this querry for MS SQL it should go through SQLI to find objects in status post-processing:
    select datediff(second,AH_TimeStamp3,GETUTCDATE()) Sekunden_seit_Jobende,AH_Name,AH_Client,AH_Idnr Runnumber from AH where dateadd(second,420,AH_TimeStamp3) < GETUTCDATE() and AH_TimeStamp4 is null and AH_Idnr in (select eh_ah_idnr from eh)​


    And here is an example of a UC4 script using the SQLI VARA
    :PRINT "Start Abfrage auf Jobs im Post-Processing."
    :SET &err# = "NEIN"
    :SET &HND#=PREP_PROCESS_VAR(VARA.SQLI_TEST_POSTPROCESSING)
    :PROCESS &HND#
    : SET &RET_Secunden# = GET_PROCESS_LINE(&HND#,1)
    : SET &RET_Name# = GET_PROCESS_LINE(&HND#,3)
    : SET &RET_Mandant# = GET_PROCESS_LINE(&HND#,4)
    : SET &RETRunID# = GET_PROCESS_LINE(&HND#,5)
    ! Ausnahmen:
    : IF &RET_Name# ne "" or "JOB1" or "JOB2" or "JOBx"
    : PRINT "ERROR: "
    : PRINT "ERROR: &RET_Name# RunID(&RETRunID#) Mandant &RET_Mandant# - seit &RET_Secunden# Sekunden im Post-Porocessing."
    : PRINT "ERROR: "
    : SET &err# = "JA"
    : ENDIF
    :ENDPROCESS
    !
    :IF &err# eq "JA"
    : PRINT "Objekte im Status 'Post-Prozessierung' gefunden."
    :ELSE
    : PRINT "Verarbeitung OK beendet."
    :ENDIF​

    Maybe it will help you.

    Greetings Ralf




  • 6.  RE: How to monitor and cancel jobs which are stopped in state "Post-processing"

    Posted 8 days ago
    Hello Ralf,

    Thanks for the idea.
    I only not understood the part in query that is German "Sekunden_seit_Jobende" and also the "Runnumber ".
    Could you explain?

    Thank you!


  • 7.  RE: How to monitor and cancel jobs which are stopped in state "Post-processing"

    Posted 8 days ago
    Hi Rodrigo,

    sorry, I just had it copied and pasted.

    Here are the translations:
    "Start Abfrage auf Jobs im Post-Processing." = "Start request for jobs in post-processing."
    "Sekunden_seit_Jobende" = "Seconds since job end"
    "Runnumber" = "RunID"
    "Ausnahmen" = "Exceptions"

    Greetings Ralf


  • 8.  RE: How to monitor and cancel jobs which are stopped in state "Post-processing"

    Posted 15 hours ago
    Hello Ralf.
    It worked fine. Thank you!