Generating Daily and Monthly Execution Reports for Specific Job Name Patterns in AutoSys
search cancel

Generating Daily and Monthly Execution Reports for Specific Job Name Patterns in AutoSys

book

Article ID: 454330

calendar_today

Updated On:

Products

Autosys Workload Automation

Issue/Introduction

Users need to generate daily and monthly reports for the total number of job executions filtered by specific job name prefixes (e.g., all jobs starting with abcde%).

The native autoaggr utility provides instance-wide statistics but does not offer granular filtering by job name or prefix.

Resolution

Important Considerations

  • Data Retention: The primary AutoSys database (MDB) typically retains job run history for a short window (e.g., 3-7 days) based on dbmaint archival settings.

SQL Query (Example)

NOTE: Broadcom Support provides the following SQL examples "as-is" for guidance purposes only. Custom SQL queries are considered outside the scope of standard support. Broadcom Support does not provide maintenance, troubleshooting, or performance tuning for custom queries. It is the user's responsibility to test and validate all queries in a non-production environment before use.

This query joins the job definition and job run tables to provide a daily count of executions for specific prefixes.

Note: This example uses Oracle syntax. Adjust the date conversion for SQL Server environments

SELECT j.job_name,
TO_CHAR(TO_DATE('01/01/1970','MM/DD/YYYY') + (r.startime/86400), 'YYYY-MM-DD') AS run_day, 
COUNT(*) AS execution_count
FROM ujo_job_runs r
JOIN ujo_job j ON j.joid = r.joid
WHERE (j.job_name LIKE 'PREFIX1%' OR j.job_name LIKE 'PREFIX2%')
GROUP BY j.job_name, TO_CHAR(TO_DATE('01/01/1970','MM/DD/YYYY') + (r.startime/86400), 'YYYY-MM-DD')
ORDER BY run_day, j.job_name;

Alternative Methods

  1. Scheduler Logs: If database history is unavailable, execution information can be extracted by parsing the scheduler event logs (event_demon output).
  2. AutoSys Web Services: REST API endpoints can retrieve job run details, which can then be aggregated by external reporting tools.

Additional Information

To speak with a customer representative or a Support Engineer see Contact Support. Scroll to the bottom of the page and click on the respective region.