[PLUG] Possible Causes of Cron Inconsistencies

Rich Shepard rshepard at appl-ecosys.com
Tue Apr 14 13:25:19 UTC 2009


   I don't expect to find why cron jobs are no longer consistent here, but
would like to learn what _might_ cause such unpredictable behavior.

   The issue is one I've raised here before: the mail log summary report
produced by the shell script 1pdflogsumm.

   Quick recap: that shell script lives in /etc/cron.daily/ and worked
consistently until recently. In root's crontab is the command to run all
scripts in /etc/cron.daily at 04:40am. The three main scripts in that
directory are 0logwatch, 1pflogsumm, and logrotate. The first and third run
every day as they should. The second one became inconsistent.

   When I stopped getting daily mail log summaries (valued primarily to
identify false positive rejections based on overly-broad UCE rules), I added
a crontab command to run the script just after midnight each day.

   For a while I was seeing two summary reports in my mail box: the one
generated at 00:02am and the one generated at 04:40am. That held all last
week; I kept the early one because I'd rather have 2 reports than none.
Saturday through yesterday, neither report ran. Nor would it run if the
script was manually invoked. Strange.

   Today, the early report ran but not the one in /etc/cron.daily.

   I know enough about system and network administration after a dozen years
to keep things up and running most of the time, and to even fix many
problems ... particularly after I inadvertently break things. But, I
certainly don't have sufficient insight to have any ideas why such
inconsistent behavior might occur. It makes no sense to me that two scripts
in /etc/cron.daily are run every day, but one no longer does. Nor why an
explicit invocation of that script from a separate command in crontab
sometimes runs, and sometimes doesn't. The shell script sets up variables
then calls /usr/local/bin/pflogsumm, a perl script. I upgraded that script
but it makes no difference.

   While I don't expect to actually be able to solve this weirdness, I would
like to understand how it possibly might occur. Your thoughts, ideas,
speculation, whatever are encouraged.

Rich



More information about the PLUG mailing list