09/20/2017 1302 views
I have been trying to get a report/list of all my scripts that have a schedule and what that schedule is. I have over 100 scripts and really don't want to manually record what their schedules are. Is there an easier way of doing that either through a KACE report or a SQL Query?
Attached is a picture of what part of the script I'm trying to report on.
Answer Chosen by the Author
Please log in to answer
Script schedules can be stored either in the IM_CRON table or the KBOT_CRON_SCHEDULE. This query should return scripts that have a schedule in one of those tables.
when KBOT.IM_CRON_ID = 0 then concat(KBOT_CRON_SCHEDULE.MINUTES," ", KBOT_CRON_SCHEDULE.HOURS," ", KBOT_CRON_SCHEDULE.DAYS_OF_MONTH," ", KBOT_CRON_SCHEDULE.MONTHS," ", KBOT_CRON_SCHEDULE.DAYS_OF_WEEK)
else concat(IM_CRON.MINUTES," ", IM_CRON.HOURS," ", IM_CRON.DAYS_OF_MONTH," ", IM_CRON.MONTHS," ", IM_CRON.DAYS_OF_WEEK," ")
end as CRON,
when KBOT.IM_CRON_ID = 0 then "KBOT_CRON_SCHEDULE"
end as CRONTYPE
LEFT JOIN KBOT_CRON_SCHEDULE on KBOT_CRON_SCHEDULE.KBOT_ID = KBOT.ID
LEFT JOIN IM_CRON on IM_CRON.ID = KBOT.IM_CRON_ID
HAVING CRON like "%"
ORDER BY KBOT.NAME
Answered 09/21/2017 by: chucksteel