[LON-CAPA-dev] cron emails

Martin Siegert lon-capa-dev@mail.lon-capa.org
Tue, 13 Sep 2005 15:21:25 -0700


Hi there,

I got informed recently that cron sends out email when running the
loncapa cron job (/etc/cron.d/loncapa). I do not know how much this
is OS specific - this is under SuSE-9.2.

Here is one of those emails:

-------------------------------------------------------------------
From: Cron Daemon <root@sfu.ca>
To: www@sfu.ca
Subject: Cron <www@lewis>    /home/httpd/perl/loncron
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/home/www>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=www>
X-Cron-Env: <USER=www>
Date: Sun, 11 Sep 2005 05:12:03 -0700 (PDT)
X-Virus-Scanned: by antibody.sfu.ca running antivirus scanner

tail: cannot open `/etc/httpd/logs/access_log' for reading: Permission denied
tail: cannot open `/etc/httpd/logs/error_log' for reading: Permission denied
checking logs
lonsql          running
lond            running
lonc            running
lonhttpd        running
lonmemcached    running
testing connections
. BCHSLib down
. UNICAMPl1 down
................ cuphysics down
..... fsua2 down
. fsua3 down
..... fvll1 down
......... ifuspl1 down
.......... lsdl1 down
........................... oucapa8 down
..... psueriel2 down
............ sunysb1 down
.... ucscl1 down
...............
99 good, 12 bad connections
checking buffers
lon-status webpage updated
sending mail
-------------------------------------------------------------------

The annoying thing is a) that the email is sent to a generic address
www@domain instead of having a MAILTO= line in the cron script (that's
why I did not know about the emails: they did annoy the wrong people)
and b) that this cron job generates output at all.
With respect to a: I now added a MAILTO= line to /etc/cron.d/loncapa,
but I suspect that that get's wiped out when I run the next UPDATE,
correct?
With respect to b: why is this not redirected to /dev/null? The cron job
is sending mail anyway and additionally sets up the lon-status web page.
This would be the third info coming from this cron job. That's a little
bit too much ... 

Cheers,
Martin

-- 
Martin Siegert
Head, HPC@SFU
WestGrid Site Manager
Academic Computing Services                        phone: (604) 291-4691
Simon Fraser University                            fax:   (604) 291-4242
Burnaby, British Columbia                          email: siegert@sfu.ca
Canada  V5A 1S6