Date: Tue, 3 Mar 2009 16:10:34 -0500 From: APseudoUtopia <apseudoutopia@gmail.com> To: Glen Barber <glen.j.barber@gmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: Cron Not Sending Mail Message-ID: <27ade5280903031310u6d7956u830938f27ea535c6@mail.gmail.com> In-Reply-To: <4ad871310903021914q647d6a40ncdb0bb9d8a3582c9@mail.gmail.com> References: <27ade5280903011124v4d6d9fdq2071d5ab44a37ca9@mail.gmail.com> <4ad871310903021914q647d6a40ncdb0bb9d8a3582c9@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Mar 2, 2009 at 10:14 PM, Glen Barber <glen.j.barber@gmail.com> wrot= e: > On Sun, Mar 1, 2009 at 2:24 PM, APseudoUtopia <apseudoutopia@gmail.com> w= rote: > [snip] >> >> ##### >> # User www's crontab >> # Note, I also tried removing the MAILTO to no avail >> ##### >> MAILTO=3Droot >> # m =C2=A0 =C2=A0 h =C2=A0 =C2=A0 =C2=A0 dom =C2=A0 =C2=A0 mon =C2=A0 = =C2=A0 dow =C2=A0 =C2=A0 cmd >> * =C2=A0 =C2=A0 =C2=A0 * =C2=A0 =C2=A0 =C2=A0 * =C2=A0 =C2=A0 =C2=A0 * = =C2=A0 =C2=A0 =C2=A0 * =C2=A0 =C2=A0 =C2=A0 echo "Hello" >> >> > [snip] > > 1.) =C2=A0You are not using the full path to /bin/echo, which is why it i= s failing. > > 2.) This is a poor designed way to test cron's mail output. > > A Better(tm) way would be something like: > MAILTO=3Droot > */5 * * * * /bin/ping -c1 localhost >/dev/null > > which would mail to root on success or failure. > > Regards, > > -- > Glen Barber > Thanks for the tips. I've put the following line in my normal user account's crontab (This account does have a shell, it's one I use on a daily basis): SHELL=3D/bin/sh MAILTO=3Dmy_email_account@gmail.com * * * * * /sbin/ping -c4 localhost I'm getting no emails at all. In /var/log/maillog, I'm getting the following output: Mar 3 21:10:00 domain sendmail[86797]: n23LA0td086797: from=3Dwww, size=3D0, class=3D0, nrcpts=3D0, msgid=3D<200903032110.n23LA0td086797@subdomain.domain.tld>, relay=3Dwww@localhost
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?27ade5280903031310u6d7956u830938f27ea535c6>