2 Replies Latest reply on Jan 8, 2020 10:36 PM by Bentze Perlmutter

    Get control m Job schedule interval details

    Yuvaraj Rajendran
      Share This:

      I would like to get details of all control m job name and its associated schedule interval details. Is there an utility or query to obtain this details.

        • 1. Re: Get control m Job schedule interval details
          SIMON LI

          Hello,

          do you mean these are cyclical jobs' interval details? in terms of query you can find them in definition table:

          CMS_jobdef  columns (fromtime,until,cyclic,cyclicint,run_times)

          but i think searching tables is not recommended by BMC, try to play with the 'Control-M Reports', shall be very easy to get what you want.

           

          good luck

          SImon

          • 2. Re: Get control m Job schedule interval details
            Bentze Perlmutter

            Hi Yuvaraj,

             

            The "scheduling" of a job is a logical combination of many optional fields in the Job and Folder definition.

            I.e. to schedule a job Control-M internal logic analyzes the Smart Folder the job is in, then the schedule of the job which can be made up of multiple fields with different optional relations.

            Therefore, a job may be scheduled on one Monday but not another Monday.

             

            To "report" on the best I've found is to use SQL and get all the job fields that optionally determine the schedule. This won't result in the schedule outcome (e.g. job scheduled on Monday 6th of Jan 2020) but will give you an idea of your schedules.

            To get the actual schedules you need to run a Forecast for a specific day and then you see what jobs are scheduled on that day.

             

            Here is the SQL I use for "report" of job schedule fields. (run this against CTM/EM database)

             

            ==================== =

            --All Jobs Report, with scheduling and run info. Includes Job Types and Plugin Types.
            --Use seperate report to get details for each plugin type job that exists as those details are in VAR table.
            select TBL.DATA_CENTER CTMNAME,
            JOB.APPLICATION APPLICATION,
            JOB.GROUP_NAME SUB_APPLICATION,
            TBL.SCHED_TABLE FOLDER,
            TBL.USER_DAILY ORDER_METHOD,
            JOB.JOB_NAME JOBNAME,
            JOB.APPL_FORM PLUGIN_TYPE,
            JOB.TASK_TYPE JOB_TYPE,
            JOB.CMD_LINE COMMAND_LINE,
            JOB.MEM_LIB SCRIPT_PATH,
            JOB.MEMNAME SCRIPT_NAME,
            JOB.PRIORITY JOB_PRIORITY,
            JOB.NODE_ID HOSTNAME,
            JOB.CYCLIC IS_CYCLIC,
            JOB.FROM_TIME FROM_TIME,
            JOB.TO_TIME UNTIL_TIME,
            JOB.TIME_ZONE TIME_ZONE,
            JOB.INTERVAL CYCLIC_INTERVAL,
            TAG.TAG_NAME RULE_BASE_CALENDAR,
            JOB.DAYS_CAL DAYS_CALENDAR,
            JOB.WEEKS_CAL WEEKS_CALENDAR,
            JOB.CONF_CAL CONFIRMATION_CALENDAR,
            JOB.SHIFT CONFIRMATION_SHIFT_TYPE,
            JOB.SHIFT_NUM CONFIRMATION_SHIFT_DAYS,
            JOB.DAY_STR MONTH_DAYS,
            JOB.W_DAY_STR WEEK_DAYS,
            JOB.DATES_STR DATES,
            JOB.MONTH_1 RUN_IN_JAN,
            JOB.MONTH_2 RUN_IN_FEB,
            JOB.MONTH_3 RUN_IN_MAR,
            JOB.MONTH_4 RUN_IN_APR,
            JOB.MONTH_5 RUN_IN_MAY,
            JOB.MONTH_6 RUN_IN_JUN,
            JOB.MONTH_7 RUN_IN_JUL,
            JOB.MONTH_8 RUN_IN_AUG,
            JOB.MONTH_9 RUN_IN_SEP,
            JOB.MONTH_10 RUN_IN_NOV,
            JOB.MONTH_12 RUN_IN_DEC
            from  DEF_TABLES TBL
            ,DEF_JOB JOB
            LEFT
            OUTER
            JOIN (select TAG_NAME,JOB_ID,TABLE_ID from DEF_JOB_TAGS) TAG
            ON (TAG.JOB_ID = JOB.JOB_ID and TAG.TABLE_ID = JOB.TABLE_ID)
            where
            (
            JOB.IS_CURRENT_VERSION='Y' and
            JOB.TABLE_ID = TBL.TABLE_ID
            )
            ORDER BY TBL.SCHED_TABLE,JOB.APPLICATION,JOB.GROUP_NAME,JOB.JOB_NAME

            ==================== =

             

            Hope this helps.

             

            Regards,

            Bentze

            2 of 2 people found this helpful