Re: scheduling a perl script

From: Jim Gibson (jgibson_at_mail.arc.nasa.gov)
Date: 03/08/04


Date: Mon, 08 Mar 2004 12:30:11 -0800

In article <dfd17ef4.0403052053.632e2e8e@posting.google.com>, mike
<s99999999s2003@yahoo.com> wrote:

> 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.

Before you do anything, check the destination server. If the file is
already there (with the proper modification date), do nothing.

[ status file method snipped ]



Relevant Pages

  • 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: Interactive Inventory
    ... entail some server side script ... Mike ...
    (microsoft.public.frontpage.client)
  • Re: match machine name to user name
    ... I will be running the script from my machine. ... rights but I do have access to the server by remote and can change ... >: poll each machine? ... > I saw a tag, yesterday I think, from a guy named Randy, I think it was. ...
    (microsoft.public.scripting.vbscript)
  • Re: checking the files in a directory
    ... On Sun, 18 May 2003 at 02:00 GMT, mike wrote: ... > Sometimes the remote process stops such that files stop coming in to ... > I intend to write a script to check the files in that /dir directory. ...
    (comp.unix.shell)
  • Re: scheduling a perl script
    ... > transfer the file to another server and then remove the file from the ... > poll the directory and if there is still no test.txt, ... > How can i implement in perl such that on the 11th, my script will not ... Your question has nothing to do with Perl. ...
    (comp.lang.perl.misc)