Mailing the output of a command run from cron
John Sims
john at pta.oz.au
Fri Apr 12 08:20:59 AEST 1991
In article <1031 at lucifer.UUCP> rst at lucifer.UUCP ( 233) writes:
>I am trying to get cron to mail me the standard output and standard error of
>regularly run commands. I have an entry that looks like this:-
>
>/usr/local/etc/crontab/evening |& mail -s "Evening cleanup" sysadmin
>
>I know the command is being executed, but the mail is never sent. Any ideas?
Assumption: you are talking about ucb cron, not att.
Two things:
Your command line uses csh syntax. cron only talks Bourne shell.
cron tends to run with a fairly restricted path (ours runs with only /bin and
/usr/bin), and /bin/mail (again, on our system) doesn't like -s. Try using
the full pathname (probably /usr/ucb/mail).
If this doesn't get you anywhere, let me know wither by posting or email.
John.
--
-m------- John Sims UUCP: pyramid!pta!john
---mmm----- Pyramid Technology Corporation INTERNET: john at pta.oz.au
-----mmmmm--- 328 High Street VOICE: +61 2 415 0515
-------mmmmmmm- Chatswood 2057 Australia FAX: +61 2 417 8636
More information about the Comp.sys.pyramid
mailing list