Modify Cron mail subject from displaying "Output from Cron"

Modify Cron mail subject from displaying "Output from Cron"

Post by Chris Matter » Sat, 13 Nov 2004 02:00:30




> Hi,

> We have a number of cron jobs running and all we have is a stupid:
> Output from "cron" command.

> So far we've been using a redirection to /dev/null but the risk is to
> miss potential problems.

> I would like instead to have a message like those we have from a linux

> path>.

> That way we know at a glance which script / command did fail.

> We use sendmail and on one particular solaris box we use exim.

> I unsuccessfully searched on the net how to do that.

> Thanks in advance

Instead of letting cron automatically mail your job's stdout
to you, route it yourself to a mail program.  Then you can
use the mail program to set whatever subject you want.
--
             Christopher Mattern

"Which one you figure tracked us?"
"The ugly one, sir."
"...Could you be more specific?"

 
 
 

1. "CRON" and "FTP" questions

1. When I run a shell script (the script contains the "mount" command), as a
cron job, it fails because it does not understand the path to /etc/mount.
But, when I run it manually it works. I do have /etc included in root's
PATH variable.

Generally what environment does cron use when it starts a job?

2. When I ftp a shell script to a remote system, the permissions of
the file at the remote system end up being 666 even when I use ftp's
"binary" option.

Naturally, I want my scripts to keep their execute permissions at the
remote system. Any ideas?

Thanks for any info.

Sam

2. Connecting two serial ports over TCP/IP?

3. environment for "at" and "cron"

4. update color yahtzee

5. redirecting output from "cron" command

6. HTML Layout?

7. Something else instead of "Output from your cron job"

8. Spoof MAC address

9. no "top" output from cron script

10. new mail from "Cron"

11. Mail to root from cron: "Logins currently disabled."

12. Want to use "mail" in cron script

13. GETSERVBYNAME()????????????????????"""""""""""""