On Mon, 02 Jul 2012 15:07:46 +0100
Chris Davies <chris-use...@roaima.co.uk> wrote:

> Titanus Eramius <tita...@aptget.dk> wrote:
> > * 04 * * * /home/titanus/scripts/web-log >> /dev/null 2>&1
> 
> > The line runs every morning at 4, and AFAIK, the /dev/-part should
> > redirect all but errors to null.
> 
> No.
> 
> 1. This runs every minute while the hour is 4. If you want the script
> to run only a 4am, you need to specify a zero minute value too
> 
> 2. The ">> /dev/null 2>&1" tells cron to thow away not just errors but
> also all normal output. If you want to lose information written to
> stderr (typically errors), then you need "2> /dev/null"
> 
>     0 4 * * * /home/titanus/scripts/web-log 2>/dev/null
> 
> Chris
> 
> 

Thank you for the corrections, the first part works now, and
the second part will probaly be tested by some future error.

Cheers


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120704125006.55639...@asrock.local.aptget.dk

Reply via email to