[Klug-general] Cron job

Alan Buchel alan at communitytechnology.org.uk
Tue Apr 14 14:05:45 UTC 2009


Nathan Friend wrote:
> Took out the ; and added -b "Some text"  same result.  Also tried with 
> no luck:
> 
> echo "Moodle db backup failed" | /bin/mail -s "Moodle db backup failed" root
> 
> On Tue, Apr 14, 2009 at 1:44 PM, Mike Evans <mike at tandem.f9.co.uk 
> <mailto:mike at tandem.f9.co.uk>> wrote:
> 
>     oh and further to my earlier - you need a body of the mail - is that
>     what the ; is attempting to terminate?  Not sure it will
> 

which distro?

Test any command first outside the script, for instance get this working 
before incorporating into script.

echo "body" | /usr/bin/mail -s "subject" root

make sure some sort of MTA is running on that system - sendmail is 
simple or postfix which will need a little config.




More information about the Kent mailing list