cron job verification

Tom Buskey tbuskey at gmail.com
Tue Jan 11 12:06:00 EST 2005


Sometime cron logs output, sometimes it emails it.  It depends on how
your unix system is setup.

If the job doesn't echo stuff to the screen, you won't get anything.

I write my scripts to write to a file I can check later.  I then
append that to a log file and/or email it to an email alias for the
sysadmin or myself (if it's a oneoff).  I usually put timestamps all
over things too.



On Tue, 11 Jan 2005 11:42:22 -0500, Larry Cook <lcook at sybase.com> wrote:
> > On my Debian boxes, cron jobs send me an email if and only if they have
> > any output.
> 
> Also on RedHat 8 and Solaris.  I would guess that is the standard behavior for
> all distros.
> 
> > You could try putting an "echo Starting job..." in
> > someplace to see if you get something from that.
> 
> If it's a script, I usually put "sh -x " in front to echo all the lines of the
> script.
> 
> > Also, I believe the
> > mails are sent to root; I have an entry in /etc/aliases which actually
> > sends it to my normal user account.
> 
> I think it is sent to the account that owns the crontab file, which would be
> the account you did the "crontab -e" from.  If I want email to go to a list of
> people I just pipe the output to mail.
> 
> Larry
> _______________________________________________
> gnhlug-discuss mailing list
> gnhlug-discuss at mail.gnhlug.org
> http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
>



More information about the gnhlug-discuss mailing list