Sometime back, I asked about ways to trim the log that cron produces. I have a
script that renames the /var/cron/log file periodically but cron continue to
write into the renamed file.
One respondent noted that this is because cron keeps the file open all the
time; another noted that cron might accept a HUP signal to reset. Well HUP
doesn't work so, other than killing and restarting cron (which would likely be
a bit dicey via a cron job) it seems that there's no sensible way to handle
In passing, I noted there's a 'logchecker' script which attempts to trim
the cron log if it exceeds the system size limit. This suffers from two flaws:
* It also doesn't tell cron to start writing the new log so its not actually
very helpful as a means of t* log files.
* It works only if size limits are defined (we dont use them yet).
To sum up then, t* the cron log file would appear to be impossible to
handle without stopping/starting cron completely, or via a reboot. I feel this
is very unsatisfactory as I want to track what cron does but do not want itb
filling up my disk. Any other suggestions would be gratefully received..
Kings College London