cronlog.conf File

Purpose

Specifies the default configuration file of the cron daemon for logging information.

Description

The cronlog.conf configuration file informs the cron daemon where and how to log information. If you do not use the -f flag, the cron daemon reads the default /etc/cronlog.conf configuration file. If the cron daemon fails to open the configuration file, it continues with the /var/adm/cron/log file. The cron daemon ignores blank lines and lines beginning with a # (pound sign).

Format

archive
Specifies that the saved rotated files will be copied to a directory. It is followed by the directory name. If archive is not specified and rotation is valid, files are rotated in the directory of logfile.
compress
Specifies that the saved rotated files will be compressed. If keyword is not present then no compression is done.
logfile
Specifies the full path name of the log file. If the file does not exist, it is created with permission 664. Do not create the log file in the "/" file system. If the cron daemon cannot create the name of the log file, the daemon creates a log of its activities in the /var/adm/cron/log file, and all of the features below it are turned off.
quiet
Specifies that cron logging will be disabled.
rotate
Specifies the total number of rotated files. It is followed by a number. If a number is not specified then there are unlimited number of rotated files. If the rotate keyword is not present, then no rotation is done. If specified, minimum of number of rotated files is 2.
size
Limits the size of a logfile. It is followed by a number and either a k (kilobytes) or m (megabytes). The default and minimum size is 30K. If the size value is invalid then rotation feature is turned off.

Examples

  1. To log information in the directory /home/user, log file cron.out, size of 2M , total number of rotated files = 4, archive in /usr/home, compress archive files, create the configuration file as follows:
         logfile=/home/user/cron.out 
         size=2m 
         rotate=4 
         archive=/usr/home 
         compress 
  2. To log information in directory /home/user, log file cron.out, size of 50k , unlimited log files, archive in /usr/home, compress archive files, create the configuration file as follows:
         logfile=/home/user/cron.out 
         size=50k 
         rotate 
         archive=/usr/home 
         compress
  3. To log information in directory /home/user, log file cron.out, size of 50k , total number of rotated files = 4, create the configuration file as follows:
         logfile=/home/user/cron.out 
         size=50K 
         rotate=4
  4. To log information in directory /home/user, log file cron.out, size of 50k , total number of rotated files = 4, archive in /usr/home, archive files without compression, no logging of cron jobs, create the configuration file as follows:
         logfile=/home/user/cron.out 
         size=50K 
         rotate=4 
         archive=/usr/home 
         quiet
    In this case, cron.out will contain only debug or error messages.