scripts

KL Davis info at nanux.com
Sat Jun 10 08:22:43 PDT 2000


I have put together a few PERL scripts that use something like that, after the
script runs it writes an event to a log and before it runs again it checks that log
against date to see if it needs to run again?  Just a thought...

KL Davis

Nils van den Heuvel wrote:

> There are special versions of crond that deal with machines that are not
> up all the time... Search on freshmeat...
>
> Georg Wilckens wrote:
> >
> > On Sat, Jun 10, 2000 at 12:13:09PM +0100, Adam Mercer wrote:
> > > hi
> > >
> > > i want to set up a script on my system that runs once a day, to clean out
> > > temp. directories, check the filesystem and other things, but i can't work
> > > out how i can check if the scripts already been run for that day.
> >
> > cron(8) jumps to my mind, but it seems like running cron doesn't
> > guarantee that a command will be executed daily. If you set it to run
> > everyday at midnight, it will never run if your machine is always
> > turned off at that time.
> >
> > > i've been thinking along the lines of 'touch'ing a file after the script has
> > > been run and then before the script is run check the datestamp of that file,
> > > if the dates the same don't run the script if it's different run the
> > > script - but i just can't work out how to check the timestamp.
> >
> > sed should help you to parse the output of ls.
> >
> > Regards,
> >         Georg
> > --
> > Georg Wilckens <durandal at nfinity.de>
> >
> > "Don't say yes until I finished talking." -- Darryl F. Zanuck
> > --
> > Mail archive: http://www.pcrdallas.com/mail-archives/lfs-discuss
> > IRC access: server: irc.linuxfromscratch.org port: 6667 channel: #LFS
> > News Reader access: news.pcrdallas.com
> > Unsubscribe: email lfs-discuss-request at linuxfromscratch.org and put
> > "unsubscribe" (without the quotation marks) in the body of the message
> > (no subject is required)
> --
> Mail archive: http://www.pcrdallas.com/mail-archives/lfs-discuss
> IRC access: server: irc.linuxfromscratch.org port: 6667 channel: #LFS
> News Reader access: news.pcrdallas.com
> Unsubscribe: email lfs-discuss-request at linuxfromscratch.org and put
> "unsubscribe" (without the quotation marks) in the body of the message
> (no subject is required)

--
Kino L. Davis
LycanthroLabs - Linux Solutions
"It's Time To Make The Change"



--
Mail archive: http://www.pcrdallas.com/mail-archives/lfs-discuss
IRC access: server: irc.linuxfromscratch.org port: 6667 channel: #LFS
News Reader access: news.pcrdallas.com
Unsubscribe: email lfs-discuss-request at linuxfromscratch.org and put
"unsubscribe" (without the quotation marks) in the body of the message
(no subject is required)



More information about the lfs-dev mailing list