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
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)?
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...
Summary: Hi All, I have a requirement to monitor the cron jobs of other Unix users on the server. All the monitoring script has do is find if cron jobs are commented out or not. Would you please let me know if...
Summary: Hi, I am new to Unix. Can anyone tell me how to setup a cron job to run the following sql query and email it to my email address at 12am every Monday and at 12am on the 1st day of each month? I'd like...
Summary: Hi, Can anyone tell as to how do I find all CORE files from all the directories and remove them. Need to implement this using a cron job. Any help ?? Thanks, ...