FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 07-04-2012, 10:47 AM
Titanus Eramius
 
Default Crontab, Scripting and Syslog (solved)

On Mon, 2 Jul 2012 15:47:35 +0200
Titanus Eramius <titanus@aptget.dk> wrote:

> snip
>
> > # min hr dom mon dow command
> > > * 04 * * * /home/titanus/scripts/web-log >> /dev/null 2>&1
> >
> > That is, every minute during hour 4, on every day of every month
> > (that being every day of the week), the command is run.
> >
> > Presumably, webalizer writes its output to the same place each time,
> > so that is why you're only seeing the output of the 4:59 run.
> >
> > Try changing your crontab to read:
> >
> > # min hr dom mon dow command
> > 0 04 * * * /home/titanus/scripts/web-log >> /dev/null 2>&1
> >
> > This will run at 4:00 every day, and is probably what you meant.
> >
> Yes it is.
> I'll try and set it and return tommorrow.
>
> Cheers
>
>

It works perfect. Thanks for the help

Cheers


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120704124712.6ea4b23f@asrock.local.aptget.dk">ht tp://lists.debian.org/20120704124712.6ea4b23f@asrock.local.aptget.dk
 
Old 07-04-2012, 10:50 AM
Titanus Eramius
 
Default Crontab, Scripting and Syslog (solved)

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

> Titanus Eramius <titanus@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-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120704125006.5563972b@asrock.local.aptget.dk">ht tp://lists.debian.org/20120704125006.5563972b@asrock.local.aptget.dk
 

Thread Tools




All times are GMT. The time now is 04:59 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org