----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, December 21, 1999 11:58 AM
Subject: Re: timed file copy.
> crond and crontab. I only know what I read in the man pages.
>
> Lawson
>
> *NIX is not a monolith, it's an attitude.
I think cron only executes it's self every 60 seconds, and if it doesn't
have anything to do, it goes to sleep for another 60 seconds. I think the
lowest value you can have cron execute something is every minute.
There is atd (`man at; man atd`) but I don't know the shortest time for at
is though.
You could also do a quick shell or Perl script
in bash:
#!/bin/sh
while [ 1 ]
do
cp /home/bud/file.txt /tmp/file.txt
sleep 20
done
or in Perl:
#!/usr/bin/perl -w
while (1)
{ system ("cp /home/bud/file.txt /tmp/file.txt");
system ("sleep 20"); }
put either one, (not both!) in a file called `update` (or whatever you think
is a better name) then run the commands
chmod 755 update; update &
this will make the script able to execute and also it will run it in the
background till you kill it. You could also do it in any half decent shell
if you would be more comfortable with that, I know C shell and Korn shell
both have a 'while' loop, but don't know the exact syntax to em.
Jack
>
> On Tue, 21 Dec 1999, TAG wrote:
>
> > Hi All
> >
> > I would like to know if anyone can help with the following question:
> >
> > Is there a way of copying a file from one location to another every 20
> > seconds?? - without doing it manually :)
> >
> > Many thanks
> > Tonino
> >
>
>
>
>
> ___________________________________________________________________
> Why pay more to get Web access?
> Try Juno for FREE -- then it's just $9.95/month if you act NOW!
> Get your free software today: http://dl.www.juno.com/dynoget/tagj.