Re: Cron help?!?
Hi Percival!
On Thu, 23 Mar 2000, Percival wrote:
> I am looking for some help with cron. I have read the man pages, but I still cannot figure out how to schedule a job and NOT have the stdout emailed to me.
Quoting from the crontab(5) manpage:
If MAILTO is defined (and non-empty), mail is sent to the user
so named. If MAILTO is defined but empty (MAILTO=""), no mail
will be sent.
> I am trying to run fetchmail to check some remote e-mail boxes
> several times an hour, and it works very well, but I end up with TOO
> many e-mails from cron. I tried to redirect, but I think that
> fetchmail doesn't work like that.
Maybe fetchmail writes to stderr too. in this case you would have to
use > /dev/null 2>&1 to also redirect stderr.
In case of fetchamil is is probably better to log to syslog if you run
it from cron though. (--syslog; keyword: set syslog)
You can also use fetchmails silent switch (--silent).
One question remains: Why do you run fetchmail from a cron-job. Maybe
you don't know of fetchmail's daemon capabilities (--daemon).
Anyway, check out the fetchmail(1) man-page.
> Is there a better way to do this? Can exim do this for me?
This is not exim's job!
--
yours,
peter
Reply to: