/build/static/layout/Breadcrumb_cap_w.png

K1000; Report on last script run

This is a FRAMEWORK only. Customize this to your own needs but I get this question a lot so I thought it may prove helpful as a basis for writing your own report.

This is to find the mahcines that were targeted by a script on its last run.

 

First get you script KBOT ID.

DO this by click on the name of your script and reading the number at the end of the string like below.

This script has an ID of 14 so thats the KBOT ID we will target with our SQL code.

From our report editor we start a new SQL report and use the following code.

 

*************SQL*******************

SELECT
KBOT.ID AS SCRIPT_ID,
KBOT.NAME AS SCRIPT_NAME,
KBOT.DESCRIPTION,
MACHINE.NAME AS COMPUTER_NAME
FROM KBOT, KBOT_LOG, KBOT_LOG_DETAIL, MACHINE
WHERE KBOT.ID = KBOT_LOG.KBOT_ID
AND KBOT_LOG.OUTPUT_DETAIL_ID = KBOT_LOG_DETAIL.ID
AND KBOT_LOG.MACHINE_ID = MACHINE.ID
AND KBOT.ID = 14
ORDER BY KBOT_LOG.START_TIME DESC
LIMIT 1

**************************************

 

Several things you can change depending on your needs.

Play around with it but to target different scripts change KOBOT_ID = 14 to your script ID. To see more than the last results remove or change the LIMIT 1 statement. 

 


Comments

  • It would be nice if this provided an indicator of which were successful and which failed results instead of just a list of all of them...:) - bnerison 10 years ago
This post is locked

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ