K1000 scheduled script runs report needed
I am looking for a SQL report to monitor the results of a scheduled script run...not a 'run now or 'run now status' report.
Most of the scripts I run are scheduled for after hours and I need to check status to see which ones failed and which ones were succcessful by each script and machine name. Having to look at all the agent logs for each one is too time consuming and a real pain.
Community Chosen Answer
Here is Chuck's SQL query updated slightly to show user run scripts for the last 24 hours
SELECT KBOT_LOG.ID, KBOT_LOG.START_TIME, MACHINE.NAME, KBOT.NAME, KBOT.ID, KBOT_LOG_DETAIL.TEXT, KBOT_CRON_SCHEDULE.* FROM ORG1.KBOT_LOG JOIN MACHINE on KBOT_LOG.MACHINE_ID = MACHINE.ID JOIN KBOT on KBOT_LOG.KBOT_ID = KBOT.ID JOIN KBOT_CRON_SCHEDULE on KBOT_LOG.KBOT_ID = KBOT_CRON_SCHEDULE.KBOT_ID JOIN KBOT_LOG_DETAIL on KBOT_LOG_DETAIL.ID = KBOT_LOG.OUTPUT_DETAIL_ID
WHERE KBOT.ID > 100 and Enabled=1 and type !="meter" and type !="system"
and KBOT_LOG.START_TIME > DATE_SUB(NOW(), INTERVAL 1 DAY)