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
Original Message:
Sent: 05-18-2020 08:52 PM
From: Rodrigo Cunha
Subject: How to monitor and cancel jobs which are stopped in state "Post-processing"
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
Original Message:
Sent: 11-01-2019 09:36 AM
From: Martineschen
Subject: How to monitor and cancel jobs which are stopped in state "Post-processing"
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
Original Message:
Sent: 10-31-2019 03:09 PM
From: Rodrigo Cunha
Subject: How to monitor and cancel jobs which are stopped in state "Post-processing"
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