Changing the automated job creation schedule

When the database management system that hosts the Information Store is IBM Db2 or Microsoft SQL Server, i2 Analyze creates jobs from all automated deletion rules according to the same schedule. When it's PostgreSQL, you must arrange scheduled job creation for yourself. In all cases, i2 Analyze provides tooling to help.

Db2 and SQL Server

Depending on the database management system that hosts the Information Store database, the IBM Db2 administrative task scheduler or Microsoft SQL Server Agent runs the task that creates deletion-by-rule jobs at intervals that you can configure.

The setting that controls how often the deletion-by-rule jobs are created is stored in the Information Store. Whenever the setting matches the current time, date, and day, the scheduler creates jobs from the deletion rules that have the value of automated set to Y.

When you deploy i2 Analyze, the setting receives its default value that means that the scheduler looks for jobs to create every hour, on the hour.
  • For Db2, a value of '0 * * * *' is used.

    For more information about the format, see UNIX cron format.

  • For SQL Server, the following arguments and values are used: @freq_type=4,@freq_interval=1,@freq_subday_type=8,@freq_subday_interval=1
    For more information about the arguments and values, see sp_add_jobschedule.
    Note: You must not specify values for the @job_id, @job_name, @name, @enabled arguments. i2 Analyze provides the values for these arguments.

To change the schedule for automated deletion, run the IS_Public.Update_Deletion_Schedule stored procedure. For example, to run the deletion-by-rule job creation task only at midnight, run the stored procedure in the following ways:

If you are using Db2, you must specify a UNIX cron value for the schedule. For example, run the stored procedure with the following value:
CALL IS_Public.Update_Deletion_Schedule('0 0 * * *');
Note: The Db2 administrative task scheduler checks for new or updated tasks at 5-minute intervals. If you change the setting, be aware of a potential delay of 5 minutes before it takes effect. You can still create a job from the rule manually if you need to.
If you are using SQL Server, you must specify arguments for the sp_add_jobschedule stored procedure. For example, run the stored procedure with the following value:
EXECUTE "IS_Public".Update_Deletion_Schedule
    @freq_type=4,@freq_interval=1,
    @freq_subday_type=8,@freq_subday_interval=24;
Note: If you are using Db2 and you follow this procedure in a deployment that provides high availability, you must run the stored procedure on the primary and any standby database instances.

PostgreSQL

Unlike Db2 and SQL Server, PostgreSQL does not have a built-in scheduling agent, and so the stored procedures for scheduling are not available in this environment.

To automate and schedule job creation, you must use a third-party agent such as pg_cron to execute SELECT IS_Public.Create_Deletion_Jobs() on a scheduled basis.

Note: Try to arrange for the function to run during quiet periods when analysts are generally not using the system, such as overnight or at weekends.