Computing.Net > Forums > Unix > FTP as Cron Job

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

FTP as Cron Job

Reply to Message Icon

Name: rob
Date: February 19, 2002 at 14:39:14 Pacific
Comment:

I need to come up with a Cron Job that automatically does an FTP. Anyone know what switches I could put in a script to allow FTP to do that (i.e. not make any prompts)?



Sponsored Link
Ads by Google

Response Number 1
Name: Leigh
Date: February 19, 2002 at 19:32:09 Pacific
Reply:

Rob,
What you can do is this....
Creat a script that runs the following command

ftp -i remote_server < ftp_command_file

The ftp_command _file has the ftp commands you need to use: eg

cd /tmp
get file.txt

Put an entry in the cron that launches the script.

In order to do this, you will require a .netrc file so that you are not prompted for a username and password.

Hope this helps.

Leigh


0

Response Number 2
Name: stefancaunter
Date: February 26, 2002 at 20:58:27 Pacific
Reply:

I use perl to do this. it is the way to go.
shell is not nimble enough to do it well - save for the actual cron utility to call perl.
If you would like an example I can send you a script; it requires perl with the networking modules built into it.


0

Response Number 3
Name: jparisse
Date: April 17, 2002 at 01:26:37 Pacific
Reply:

i have the same will as Rob, so yes i'd be pleased if you'd accept to send me your pearl script...
thx in advance...


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: FTP as Cron Job

Cron jobs of other users www.computing.net/answers/unix/cron-jobs-of-other-users/6557.html

cron job www.computing.net/answers/unix/cron-job/7077.html

Cron jobs www.computing.net/answers/unix/cron-jobs/3366.html