[nmglug] cron e-mail /dev/null

a a at kaluta.us
Tue Jan 26 02:52:12 PST 2010


Jason;
I will try your suggestion in fact,before this communication,I had
rejected the idea in theory,perhaps through specious reasoning, and
further by  having reset cron from "-mtime +1" to "-mmin +90" for test
purposes.
Best
Anthony




On Mon, 2010-01-25 at 11:23 -0700, Jason Schaefer wrote:
> On Mon, Jan 25, 2010 at 5:52 AM, a <a at kaluta.us> wrote:
> > When there is "*.jpg" content the cronjob successfully reads:
> > "/home/kaluta/kaluta.us/jerry-camera/*.jpg".
> >
> > When there is not "*.jpg" content (i.e. camera off). I am e-mailed the
> > following message hourly by cron:
> > "/usr/bin/find: /home/kaluta/kaluta.us/jerry-camera/*.jpg: No such file"
> > or directory.
> 
> Hey Anthony
> 
> The solution is very simple. Add > /dev/null 2>&1 to the end of your
> command(s) inside your cron.
> steps to follow:
> 1. crontab -e
> 2. add "> /dev/null 2>&1" to the end of the lines you don't want to
> received any notifications for. (without the quotes)
> 3. save
> 
> This redirects (>) the standard output (1) and standard error (2) of
> the command to /dev/null (the black hole of nix)
> 
> >
> > Can anyone suggest a method of avoiding the "superfluous" hourly e-mail.
> > tnx, Anthony
> >
> >
> >
> >
> > _______________________________________________
> > nmglug mailing list
> > nmglug at nmglug.org
> > https://nmglug.org/mailman/listinfo/nmglug
> >
> _______________________________________________
> nmglug mailing list
> nmglug at nmglug.org
> https://nmglug.org/mailman/listinfo/nmglug





More information about the nmglug mailing list