[ale] Explain Shell Script Behavior?
Joe Steele
joe at madewell.com
Mon Oct 9 17:00:43 EDT 2000
Sendmail is running because that is what crond is using to mail the cron job's
output to you.
The likely scenario is that cron starts sendmail, specifies the envelope
addresses, sends a few mail headers, and then leaves sendmail to collect the
standard output from the job as it runs.
Cron can be built to use other mail programs too, such as /bin/mail. Also, if
you want to totally inhibit the mail, add MAILTO="" to the job.
(See "man 5 crontab").
--Joe
-----Original Message-----
From: Jeff Hubbs [SMTP:Jhubbs at niit.com]
Sent: Monday, October 09, 2000 2:31 PM
To: Joe Knapka; Jeff Hubbs
Cc: ale at ale.org
Subject: RE: [ale] Explain Shell Script Behavior?
> Maybe this was actually the normal sendmail deamon instance? If not,
> I don't know...
No, sendmail doesn't run as a daemon on this machine. The only speculation
I could come up with is that when bash hits an "if" statement, perhaps it
preloads commands to be executed in RAM but only invokes them if that code
segment actually gets executed.
> Yes. Cron always mails all output from commands to the owner of the
> crontab file, so if you don't want that you have to redirect the
> output somewhere.
OK, that would explain a lot except that I'm pretty sure that crontab is
owned by root. Do you perhaps mean that cron mails output of a job to the
owner of the job ("jhubbs" in this case)?
- Jeff
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.
More information about the Ale
mailing list