develooper Front page | perl.beginners | Postings from April 2002

Re: Backing up two days from localtime

Thread Previous | Thread Next
From:
Michael Lamertz
Date:
April 26, 2002 04:42
Subject:
Re: Backing up two days from localtime
Message ID:
20020426112455.GC3348@lamertz.net
On Fri, Apr 26, 2002 at 09:32:04AM +0100, Jonathan E. Paton wrote:
> > I need to back up two days from localtime and I can't
> > figure out how to do it. Currently I'm doing this just
> > so I can work out the rest of the program:
> 
> [Ignore me if you aren't on a Unix like platform]
> 
> Hi,
> 
> You should seriously consider installing the 'at' job
> manager for run-once tasks, or 'cron' to schedule tasks
> regularly.  Try to avoid spreading time-scheduling
> around, especially into memory hungry Perl processes
> that just sit around doing nothing.
> 
> man at
> man cron

I think you're missing the point here.  It's quite a common task to work
on logfiles that are a day or two old and have a timestamp in their
filename.  Sometimes these files are just required to be kept where they
are for some days, and then one has exactly the problem the original
post described.

He'll still use cron to schedule his script, but the script will need to
'calculate' the filename of the n-days old logfile.

-- 
		       If we fail, we will lose the war.

Michael Lamertz                        |      +49 221 445420 / +49 171 6900 310
Nordstr. 49                            |                       mike@lamertz.net
50733 Cologne                          |                 http://www.lamertz.net
Germany                                |               http://www.perl-ronin.de 

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About