New Day Procedure

The New Day procedure is the start of the Control-M/Server day and is performed daily at a predefined time. The default time is 07:00 am.

If you want to change the default New Day time, update the DAYTIME system parameter, as described in New Day Parameters.

Control-M/Server processes shut down during the New Day procedure and restart after it completes.

The New Day procedure performs the following tasks:

  • Cleans Control-M/Server logs, statistics, job information, and Agent output.

  • Removes jobs that are no longer needed for the upcoming day.

  • Loads new jobs for the upcoming day.

  • Downloads the environment to Control-M/EM database.

User Daily

User Daily is a method that runs the jobs according to the time defined in the User Daily instead of the New Day procedure time. During New Day, the Control-M/Server loads the User Daily folder. After the New Day procedure completes, the User Daily runs the jobs according to its definition. This reduces the load that the New Day procedure needs to perform.

You can also schedule a User Daily job to execute the ctmudly utility, which runs jobs and folders that are associated with a specific User Daily name. For more information, see and Defining a Specific User Daily Job.

  • To not overload the Control-M/Server, it is recommended to schedule User Daily jobs to run after the New Day procedure completes.

  • Do not schedule Control-M/Server utilities that affect and modify the Active environment to run during the New Day procedure, as this can cause the New Day procedure to fail.

Agent New Day Procedure Tasks

The following occurs on the Agent during the New Day procedure:

  • If the Agent was upgraded, any upgrade files that are no longer used are deleted.

  • All files in the Proclog folder, which keeps process logs, are deleted.

    The number of days to keep the Proclog files is determined as follows:

    • The LOGKEEPDAYS value in the CONFIG folder is used. The default is 1.

    • If LOGKEEPDAYS does not exist, the SYSKEEPDAYS value is used.

    • If SYSKEEPDAYS does not exist, the DSECT value sent from Control-M/Server is used.

    • If DSECT does not exist, the default is 1.

  • The oldest Dailylog file is deleted. The Dailylog files contain general information about processes that run on the Agent.

    The oldest Dailylog file is determined by the value of the MEASURE_USAGE_DAYS parameter in the CONFIG folder. The default is 7.

  • The oldest Agentless Host files are deleted.

    The RH_KEEPDAYS in the CONFIG folder determines how many days of Agentless Host files to keep. The default is 7.

  • A general cleanup is performed, which includes the following:

    • The STATUS, PROCID, ONSTMT, runtime and non-root directories are deleted.

      The GENERAL_CLEANUP_INTERVAL in the CONFIG folder determines the number of days to keep these directories. The default is 30.

    • The OUTPUT directory (formally SYSOUT) is deleted.

      The greater value between GENERAL_CLEANUP_INTERVAL and SYSKEEPDAYS determines the number of days to keep this directory.

  • The backup directory, which contains information about all the jobs that have run on the Agent, is deleted.

    The SYSKEEPDAYS value determines the number of days of the backup directory to keep.

    During this process, the DSECT of each Application is read and each Application is called to delete its old job files.

    The corresponding onstmt and capture def files are deleted.

    Backup files that are no longer required are deleted. If the process fails to read a backup file, it deletes it.

Automatic Prerequisite Condition Cleanup

The Ignore New Day Conditions system parameter is set to N by default. This means that the New Day procedure cleans up prerequisite conditions that are one year old (ODATClosed The date that a job joins the Run Queue.+1). BMC recommends that you do not modify the value of this parameter.

If you have jobs that are triggered by prerequisite jobs that ran the year before, you can change the value of Ignore New Day Conditions to Y, so that the New Day procedure does not clean up old conditions. However, this increases the risk that jobs might be prematurely triggered, since jobs that are waiting for a prerequisite job that runs in the future can be triggered by a job that ran in the past.

You can also retain prerequisite conditions for more than one year without changing the default value of the Ignore New Day Conditions parameter. Conditions that are added to the Conditions file with a date reference value of STAT are not automatically cleaned by the New Day procedure. However, as you can change the value of the Ignore New Day Conditions parameter to Y, you need to identify the prefixes or masks of the conditions that must be ignored (not deleted) in the Ignore Conditions file dbs_ignrcond.dat. Any conditions whose prefixes or masks are not specified in the file are treated as if you did not change the default. Therefore, if you retain prerequisite conditions beyond one year (ODAT+1), it is recommended that you provide them with a prefix not used by conditions that must be deleted on time.

The Ignore New Day Conditions parameter is set to Y and the Ignore Conditions file contains the following prefixes:

  • prq_rs_*rpt

  • pre_prn

  • srt_def_?

If the new Control-M working date is 15 January 2022, the following table describes which prerequisite conditions are deleted from the Control-M/Server database by the New Day procedure.

Conditions that Exist before the New Day Procedure

Conditions that Remain after the New Day Procedure

bra_fn_01 14/22

bra_fn_01 14/22

bra_fn_01 15/22

 

prq_rs_21rpts 14/22

prq_rs_21rpts 14/22

prq_rs_21rpts 15/22

prq_rs_21rpts 15/22

pre_prn 15/22

pre_prn 15/22

pre_prn_01 15/22

 

srt_def_a 15/22

srt_def_a 15/22

srt_def_a1 15/22