in reply to Net::Ftp and cron

You'll want to post your code if you want to get more meaningful responses.

You might try:

$ftp=Net::FTP->new("ftp.microsoft.com", Debug => 1, );
to catch more info from Net::FTP

Also, I have had problems using cron because the path and/or env and/or current working directory wasn't the same as when I ran it from the cmd line. This may cause the script problems in finding libraries, external commands, reading and/or writing files were you expect them to be etc. A simple-minded solution to the cwd problem is have the perl script cd to its own location at the top of the script.

Also, is the crontab that of the user that was logged in on the cmd line that you used to run the test?

-------------------------------------
Nothing is too wonderful to be true
-- Michael Faraday

Replies are listed 'Best First'.
Re: Re: Net::Ftp and cron
by eosyn (Initiate) on Jun 26, 2003 at 19:05 UTC
    Hi, sorry it's taken me long to reply. I wouldn't return more information until I really went over the packet dumps and debug info. I manged to solve it by throwing in a sleep for 5 seconds before I closed the connection. Not sure why exactly that is but perhaps it was truncating the pgp file and thus causing corruption. Thanks for the advice. eo