Mailinglist Archive: opensuse (1815 mails)

< Previous Next >
Re: [opensuse] mail from cron ?
  • From: Chuck Payne <terrorpup@xxxxxxxxx>
  • Date: Mon, 5 Jul 2010 11:56:07 -0400
  • Message-id: <AANLkTik9Pbaiy02962pSuW-Ez4rDG1FkM29RPBN4jwdH@xxxxxxxxxxxxxx>
On Mon, Jul 5, 2010 at 11:42 AM, Dave Howorth
<dhoworth@xxxxxxxxxxxxxxxxx> wrote:
I have an 11.2 system and am having trouble configuring it to send me
mail from some cron jobs. The problem is the /root/bin/cron.daily.local
script. I know it runs because I have a line in it that says

 date >> /root/cron.dbg

and the file gets a new line added every day. The script also has a
mailto line and a line that prints output:

 MAILTO=dhoworth@xxxxxxxxxxxx
 echo 'This is /root/bin/cron.daily.local'

The sysconfig variable SEND_MAIL_ON_NO_ERROR is set to yes but I get no
mail from the job. I do get mail from a job in root's crontab:

 SHELL=/bin/bash
 MAILTO=dhoworth@xxxxxxxxxxxx

 # m h d mo dow
 50 15 * * * echo hello

What am I missing? :(

Thanks, Dave
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx



What agent are you using to send the mail. I use mail and mailx, some
people use mutt.

I use this to set my vars

//VAR Are set here....

$hostname = "tatl0wlluna.magidesign.com";

//This is a simple email to give me the status from yester day.
//This connect the script to the db

//To use ',' between e-mail address for multiple recipents
$to = 'a@xxxxxxxxxxxx';
$to .=',b@xxxxxxxxxxxx';

//Set the Subject here...
$subject = "This is my subject...";

// Mail it
mail($to, $subject, $message);

Hopefully that will help.

--
-----------------------------------------
Discover it! Enjoy it! Share it! openSUSE Linux.
-----------------------------------------
openSUSE -- en.opensuse.org/User:Terrorpup
openSUSE Ambassador/openSUSE Member
skype,twiiter,identica,friendfeed -- terrorpup
freenode(irc) --terrorpup/lupinstein

Have you tried SUSE Studio? Need to create a Live CD, an app you want
to package and distribute , or create your own linux distro. Give SUSE
Studio a try. www.susestudio.com.
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups
References