KB Article #102103
How to change server log rotation scheduling
How to change server log rotation scheduling
Most of the logs are stored (out of the box) in the database, and their rotation is controlled by various applications (LogEntryMaint, AuditLogMaint, etc.). This article focuses on the ones that are stored in flat files.
You can modify the log rotation schedule by editing the root crontab file.
On Windows, this is located at CYGWINHOME/var/cron/tabs/SYSTEM (where CYGWINHOME is the directory where SecureTransport's version of Cygwin is installed - by default, C:/Program Files/SecureTransport/cygwin). Use your favorite text editor to edit this file.
On Unix, this is located at /var/spool/cron/crontabs/root (for Solaris and AIX), or /var/spool/cron/root (for Linux). (These paths are under the system root directory, not STHOME.) Use the crontab -e command to edit this file (you must be logged in as root); it will open the file using the vi editor.
The schedule fields in this file, and the allowable values for each one, are:
Minutes 0-59
Hours 0-23
Day of Month 1-31
Month 1-12 (or name)
Day of Week 0-7, where Sunday is 0 or 7 (or name)
A * character in any field means "all legal values" (so, for example, a * in the Day of Week field will cause the job to run every day of the week). You can also use multiple elements separated by commas in any field, where an element is either a single number (such as 4) or a range of numbers separated by a dash (such as 4-8); see the crontab manpage for details.
To disable a rotate job, put a # character at the beginning of the line that calls it.
Some examples:
The default rotate job as defined during installation, which runs every night at 11:59 PM:
59 23 * * * "c:/Program Files/SecureTransport/STServer/bin/rotate" >> /tmp/rotate.out 2>&1
To run the job every Sunday at midnight:
0 0 * * 0 "c:/Program Files/SecureTransport/STServer/bin/rotate" >> /tmp/rotate.out 2>&1
To run the job every eight hours on Monday through Friday:
0 0,8,16 * * 1-5 "c:/Program Files/SecureTransport/STServer/bin/rotate" >> /tmp/rotate.out 2>&1
On Windows, you must restart the cron service after making changes to this file. To do this, find the "cygwin cron" service in the Windows Services list, right-click it, and select Restart.