Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Mike Bristow <michaelb@totally.irrelevant.org>
Subject: Re: Automatic downloading by using cron ?
Date: 1998/12/17	[thread overview]
Message-ID: <conb57.uil.ln@totally.irrelevant.org> (raw)
In-Reply-To: 367925E6.99292A44@shoreland.com

Matt Bumgardner <mbumgard@shoreland.com> wrote:
> You could try writing a perl script with the Net::FTP module and then
> schedule it with cron.  This is a part of the small script we use at my
> work:
>
> use Net::FTP;
> &main
> sub Main  {
>   $ftp = Net::FTP->new ("ftp.server.com");
>   $ftp->login("anonymous","anonymous@somewhere.com");
>   $ftp->binary();
>   $ftp->cwd("/pub");
>   $ftp->get("file.zip");
>   $ftp->close();
> }                     
>

Add error checking.  Now.  I mean it.  It's a really good idea.

I'd hope that Net::FTP was written well enough so that you can

$ftp->get('file.zip') or ( mail('sysadmin@shoreland.com', "Oh my god! the get failed! PANIC!") and exit(1) );

but I'm too lazy to rtfm.

-- 
oderint dum metuant



  reply	other threads:[~1998-12-17  5:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-16  5:00 Automatic downloading by using cron ? Nguyen-Dai Quy
1998-12-16  5:00 ` J. S. Jensen
1998-12-16  5:00 ` Timothy J. Lee
1998-12-17  5:00   ` William Roeder
1998-12-16  5:00 ` Mario Stargard
1998-12-17  5:00 ` Nikola Milutinovic
1998-12-17  5:00 ` Matt Bumgardner
1998-12-17  5:00   ` Mike Bristow [this message]
1998-12-17  5:00 ` Giant Wang
1998-12-17  5:00   ` Mike Di Fulvio
1998-12-17  5:00     ` Jens Kristian S�gaard
1998-12-17  5:00 ` Urban Roth
1998-12-20  5:00 ` MK
1998-12-23  5:00   ` qhuo
1998-12-29  5:00     ` Bill Thompson
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox