On Wednesday 05 May 2010 07:45:24 Mick wrote:
> On Tuesday 04 May 2010 23:40:20 Alex Schuster wrote:
> > Mick writes:
> > > I am getting a bit confused from the messages that I receive in my
> > > gmail account sent from my crontab.
> > > 
> > > First, is related to the title which is:
> > >  Cron <r...@mylaptop> test -x /usr/sbin/run-crons &&
> > > 
> > > /usr/sbin/run-crons
> > > 
> > > I am not sure what this "test -x" part represents?
> > 
> > It means: If /usr/sbin/run-crons is executable, execute it. It could also
> > be written as
> > 
> >     [ -x /usr/sbin/run-crons ] && /usr/sbin/run-crons
> > 
> > or
> > 
> >     f=/usr/sbin/run-crons
> >     if [ -x $f ]
> >     then
> >     
> >         $f
> >     
> >     fi
> 
> Thank you, I understand what the test does.  What I am not sure is why this
> is printed on the title of the email.  Where is what is printed on the
> email title controlled from?  Is it editable?

It's cron's default. If it sends a mail, by default it does this:

The subject is the program field in the crontab
The body is the output from the program.

You can't normally change that. What you do is edit your called script to 
intelligently mail you the information you do want, and send all output to 
devnull to suppress cron's default mailer settings

-- 
alan dot mckinnon at gmail dot com

Reply via email to