On Fri, 22 May 2009, wes wrote: > Right, but if the question is "why is cron running every script but this > one?" Now we can say for certain that the answer is "cron IS running this > script, but this script itself is failing."
Wes, That's the path I was following until I hit a dead end. > Again, you are focusing on cron here. Out of desparation. > If the set -x output appears during each invocation, then cron is indeed > running the script, and you need to look within the script itself for the > problem. As in, more logging. I will look for options on the 'set' command to learn what additional output can be produced. > This is a good question. I don't have an answer, but generally, logging > helps. Also, in cases like this, I have found that the shell environment > in which it is running can make a big difference. This can be different > when running from cron, like envronment variables could be different, > permissions could be different (as it's running as a different user), or > any number of other things. set -x can show you some of this stuff, which > we'd have to see differential reports between when it works and doesn't in > order to tell (which you've probably sent before, but I didn't look, and > can't be bothered to search my archives right now). The problem is that set -x sends its reports with exit code 0 regardless of the mail log summary itself being run and mailed to me. For example, I just ran /etc/cron.daily/1pflogsumm from the command line. The results of 'set -x' immediately appeard in the terminal. However, neither this result nor the mail log summary is in my inbox. > Is the error log ever not mailed to you when it should be? Sometimes. This is what is so aggrevating: no consistency anywhere. Rich _______________________________________________ PLUG mailing list [email protected] http://lists.pdxlinux.org/mailman/listinfo/plug
