scheduling a perl script

From: mike (s99999999s2003_at_yahoo.com)
Date: 03/06/04


Date: 5 Mar 2004 20:53:49 -0800

hi

i wrote a script that is supposed to check a directory and see if
there is a file named "test.txt" there and if there is , use ftp to
transfer the file to another server and then remove the file from the
directory.
I had scheduled a job in windows to poll for this directory looking
for "test.txt" every month on day 8, 9 and 10 and 11, because test.txt
will arrive anytime during 8,9 and 10. On the 11th, my script will
poll the directory and if there is still no test.txt, will alert the
administrator.

How can i implement in perl such that on the 11th, my script will not
mistake that test.txt is not there while in fact, it has already been
transfered to another server and removed after transfered?
I thought of not removing test.txt after transfered but if the file
arrived on the 8th, then on the 9th i would do another identical
transfer.

I also thought of using a "status" file. Something like

open ( STATUS , "> status.out");
print STATUS "0";

then if test.txt arrrives, do the transfer, remove the file and update
STATUS.
Is this the correct way to do ??
thanks



Relevant Pages

  • Re: Same Internal Server Error from last two days
    ... I am trying to run a Hello World Perl Script in Apache 2.2. ... But its constantly giving me Internal Server Error.The script ... # have to place corresponding `LoadModule' lines at this location so the ...
    (perl.beginners)
  • Re: Same Internal Server Error from last two days
    ... I am trying to run a Hello World Perl Script in Apache 2.2. ... But its constantly giving me Internal Server Error.The script Runs perfectly fine from the command prompt. ... # This is the main Apache HTTP server configuration file. ... LoadModule actions_module modules/mod_actions.so ...
    (perl.beginners)
  • Same Internal Server Error from last two days
    ... I am trying to run a Hello World Perl Script in Apache 2.2. ... But its constantly giving me Internal Server Error.The script ... # have to place corresponding `LoadModule' lines at this location so the ...
    (perl.beginners)
  • Re: match machine name to user name
    ... :>: query the server from a client for a username based on a machine name. ... :> It reads better if you post inline or at the bottom. ... Is it better to use the script to poll the server or to ...
    (microsoft.public.scripting.vbscript)
  • Re: Regarding a selection for mobile code/scripting language
    ... Client Side scripting, so the server can send script commands to the client. ... I decided they should be scripted and mobile code. ...
    (Vuln-Dev)