Configuring the frequency of automatic rotation of message log files

You can configure the frequency of the built-in Scheduler tasks that automatically rotate online message log files.

About this task

The default frequency of the bar_act_log_rotate, bar_debug_log_rotate, and online_log_rotate tasks is 3 A.M. every 30 days with a maximum of 12 log files, but you can configure the task to run more or less frequently.

Prerequisite:

If you did not enable the task for rotating the message log that you want to configure, do that now.

To configure a task for rotating logs to run more or less frequently:

Procedure

Run the following SQL statements, where days is the number of days between each run:
DATABASE sysadmin;
UPDATE ph_task set tk_frequency = frequency
 WHERE tk_name = task_name;

The task name must be bar_act_log_rotate, bar_debug_log_rotate, or online_log_rotate.

For example, to change the frequency of the online_log_rotate task specify:

DATABASE sysadmin;
UPDATE ph_task SET tk_frequency = INTERVAL (10) 
DAY TO DAY WHERE tk_name = "online_log_rotate";

What to do next

You can also disable the running of message lot rotation tasks, by setting tk_enable to f (false), as follows:

UPDATE ph_task SET tk_enable = f , tk_frequency = tk_frequency
WHERE tk_name = "online_log_rotate";