[nmglug] cron e-mail /dev/null

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


Bin:
Thank you for your suggestion.
The system is for my brother who,when he travels may be away from home
for several months running.The system will act as a general monitor and
serve to record any possible intrusions. Best,Anthony

On Mon, 2010-01-25 at 11:09 -0700, Bin Hu wrote:
> I guess you can put a script under your home directory, say
> ~/bin/myscript.py, and make a user cron entry instead.
> 
> By the way, I am interested in what you want to do with the script. It
> sounds like a surveillance program :-).
> 
> Regards,
> Bin
> 
> On Mon, Jan 25, 2010 at 8:09 AM, a <a at kaluta.us> wrote:
> > Ed:
> > Thank you for the well thought out suggestion,I am pretty new to this
> > stuff, please forgive any inaccuracies in the following:
> > I have been given a limited server account on which to doodle,I do not
> > have access to any bin directories.however,I will use your suggestion to
> > familiarize myself with the various components of your your informative
> > directive. Best,Anthony
> >
> > On Mon, 2010-01-25 at 06:40 -0700, Ed Santiago wrote:
> >> On Mon, 25 Jan 2010 05:52:01 -0700, a 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.
> >> >
> >> >Can anyone suggest a method of avoiding the "superfluous" hourly e-mail.
> >> >tnx, Anthony
> >>
> >>  * Snip at cut-here.
> >>  * Save into a file named "camera-clean" (or whatever you like),
> >>    in a bin directory of your choosing.
> >>  * Make it executable [ chmod 755 /my/bin/camera-clean ]
> >>  * Put it into source control (git, hg, even RCS).
> >>  * Fix the FIXMEs (you'll thank yourself later).
> >>  * Change your cron rule to:
> >>
> >>    - ...* * [complex find command]
> >>    + ...* * /my/bin/camera-clean
> >>
> >> Writing a short script may seem like overkill.  It's not.
> >> Complex cron entries are unmaintainable.
> >>
> >> Hope this helps,
> >> Ed
> >>
> >> ---------------cut--here--------------------------------------------
> >> #!/bin/sh
> >> #
> >> # camera-clean - clean up blah blah blah FIXME
> >> #
> >> # $Id$
> >> #
> >>
> >> # Directory containing images.  jpg files are deposited here by FIXME.
> >> cd /home/kaluta/kaluta.us/jerry-camera || exit 1
> >>
> >> # Look for jpg files older than 1 day, and silently delete them.
> >> # Only look in current directory (-maxdepth), not in subdirectories.
> >> find . -maxdepth 1 -name '*.jpg' -mtime +1 -print0 | \
> >>      xargs -0 --no-run-if-empty rm -f
> >> _______________________________________________
> >> 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
> >
> _______________________________________________
> nmglug mailing list
> nmglug at nmglug.org
> https://nmglug.org/mailman/listinfo/nmglug





More information about the nmglug mailing list