On Friday 21 March 2008, Kaushal Shriyan wrote:
> On Fri, Mar 21, 2008 at 12:56 PM, Alan McKinnon
> <[EMAIL PROTECTED]>
>
> wrote:
> > On Friday 21 March 2008, Kaushal Shriyan wrote:
> > > Hi
> > >
> > > [EMAIL PROTECTED]
> > > 0 18 * * * rsync -av /var/lib/mysql [EMAIL PROTECTED]:/var/lib/
> > >
> > > If i put this two lines in crontab it will run correctly,My
> > > requirement was to create a script, this script should indicate
> > > success or failures and the reason for failure
> >
> > crontab will only send a mail is there is anyput to stdout. What
> > output do you get if you run the rsync manually?
>
> Hi Alan
>
> When i run the rysnc command by hand, it runs successfully without
> any issues. I can see it on stdout saying building list files........
> and then the rsync process

Most likely cause is that he shell that crontab runs in is NOT the same 
shell as your user account and does not have the same PATH.

Solution: never rely on PATH in a crontab, supply the full PATH 
yourself. Try calling rsync as /usr/bin/rsync as see if that fixes it

> > Do you have any packages installed that can actually send the mail?
>
>  I did not understand this question

crontab does not do SMTP, it does not know how to send mail. You need a 
mailer to be installed - like sendmail or mail


-- 
Alan McKinnon
alan dot mckinnon at gmail dot com

-- 
gentoo-user@lists.gentoo.org mailing list

Reply via email to