Re: How to stop a cron job sending email
- From: Karl Auer <kauer@xxxxxxxxxxxxxx>
- Date: Fri, 31 Oct 2008 22:02:27 +1100
On Fri, 2008-10-31 at 11:48 +0200, Johann Spies wrote:
The same user crontabs (that run every 5 minutes) that were used on my
old computer (Debian) now (on Ubuntu Hardy) produce an email for
every run.
If a cron job produces output, any output at all, on stdout or stderr,
it will be sent to the root user by email. That means either that the
scripts themselves are producing an output they did not produce before,
or the redirection is not working, where it did work before.
How about letting us see one of those emails?
Here is an example of one of them:
#!/bin/sh
killall fetchmail &> /dev/null
/usr/bin/fetchmail &> /dev/null
I'm not familiar with that syntax ("&>"). If it's legal bash syntax, it
could be that it is one of the syntax subtleties NOT supported by dash,
the new /bin/sh shell.
If the cron output in the emails is truly innocent, and not a symptom of
some deeper problem, you could try the more standard syntax for
redirecting stdout and stderr to null and see if that helps:
killall fetchmail > /dev/null 2>&1
/usr/bin/fetchmail > /dev/null 2>&1
I'm curious though - why on earth are you killing and restarting
fetchmail every five minutes?!?
Regards, K.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer@xxxxxxxxxxxxxx) +61-2-64957160 (h)
http://www.biplane.com.au/~kauer/ +61-428-957160 (mob)
GPG fingerprint: DD23 0DF3 2260 3060 7FEC 5CA8 1AF6 D9E3 CFEE 6B28
Attachment:
signature.asc
Description: This is a digitally signed message part
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
- Follow-Ups:
- Re: How to stop a cron job sending email
- From: Johann Spies
- Re: How to stop a cron job sending email
- References:
- How to stop a cron job sending email
- From: Johann Spies
- How to stop a cron job sending email
- Prev by Date: Re: How to stop a cron job sending email
- Next by Date: Re: init problem with Intrepid
- Previous by thread: Re: How to stop a cron job sending email
- Next by thread: Re: How to stop a cron job sending email
- Index(es):
Relevant Pages
|