From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f72b0,6085b126b0df2ddd X-Google-Attributes: gidf72b0,public X-Google-Thread: fc89c,6085b126b0df2ddd X-Google-Attributes: gidfc89c,public X-Google-Thread: 1020c6,6085b126b0df2ddd X-Google-Attributes: gid1020c6,public X-Google-Thread: 1012a6,6085b126b0df2ddd X-Google-Attributes: gid1012a6,public X-Google-Thread: fee84,6085b126b0df2ddd X-Google-Attributes: gidfee84,public From: Mike Bristow Subject: Re: Automatic downloading by using cron ? Date: 1998/12/17 Message-ID: #1/1 X-Deja-AN: 423364054 X-NNTP-Posting-Host: totally.irrelevant.org:194.159.247.28 References: <3677D4C6.2FC1B5FC@ulg.ac.be> <367925E6.99292A44@shoreland.com> X-Trace: news.demon.co.uk 913926003 nnrp-04:20446 NO-IDENT totally.irrelevant.org:194.159.247.28 User-Agent: tin/pre-1.4-980730 (UNIX) (OpenBSD/2.4 (i386)) Newsgroups: comp.unix.admin,comp.unix.shell,comp.unix.osf.osf1,comp.unix.misc,comp.unix.programmer X-Complaints-To: abuse@demon.net Matt Bumgardner 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