crontab ftp

I'm looking for some assistance in setting up a crontab process to ftp 7 text files from a linux server to a windows 2k server. I've done very little work with linux on the command line. I know enough to get me around, but not enough to develop something. If someone has a suggestion on a resource to assist me or can write me an example script, that would be great.

- Ian
LVL 7
black0psAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TintinCommented:
To create a FTP script, use something like:

#!/bin/sh

ftp -inv <<EOF
open hostname
user username password
cd somedir
prompt
mput *.txt
quit
EOF

How often do you want it to run?  There's a few different ways to setup cronjobs.  
0
black0psAuthor Commented:
I need to run it once a day.
0
wesly_chenCommented:
The name of Tintin's script is /usr/local/bin/ftp.sh
Then
# crontab -e
1 * * * * /usr/local/bin/ftp.sh > /dev/null 2>&1

Wesly
0
wesly_chenCommented:
Sorry. it should be
0 1 * * * /usr/local/bin/ftp.sh > /dev/null 2>&1     <=== Every day at 1:00AM

Wesly
0
TintinCommented:
Alternatively, you can place your script in /etc/cron.daily (assuming you have vixie-cron installed)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux OS Dev

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.