At 02:25 PM 5/31/02 -0500, Lance Prais wrote:
>I am trying to call a script that will run every 10 seconds for 1 minute
>then exit.
>
>[snip]
>There are a couple of problems that I am having:
>1.      The script is never ending.  I though "while (1)" is the right way to
>do this.

Out of curiosity, what did you think "while (1)" meant?

To get the behavior you want, replace "while (1)" with "for (1..6)".
There are more maintainable ways that allow more flexibility in the 
repetition, but that'll do to start with.

>2.      Every time it runs I get the follow error it never opens another
>outlook.txt file.  so the script continues to read the same txt over and
>over again.
>                 The process cannot access the file because
>                 it is being used by another process.
>
>I use this function in over scripts  that when called from scheduler it will
>reopen an new txt file but form some reason with in this loop it fails.  Any
>Ideas?

Not sure, but if your process keeps running, then the next time one starts 
the previous one will still be running, no?  And you never close() a 
filehandle.
--
Peter Scott
Pacific Systems Design Technologies        Boston Perl Classes in July:
http://www.perldebugged.com/               http://stemsystems.com/class/


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to