I would like to create a cron job that uploads files from a directory on my computer to my FTP server. I would like it to do it daily at midnight. I know pretty much nothing about cron, so I apologize if I sound stupid!
feedback
|
migrated from stackoverflow.com May 22 '10 at 22:14
This question came from our site for professional and enthusiast programmers.
|
This is an FTP sample script to transfer one file:
Add the last line only if you need logging. Then you can use the
command to edit the cronjob table and add your script. This is an Example: If you liked to have a the script above, (assume you have it in home and its name is myscript.sh) /home/myscript.sh, run every day at 2am, you have to do:
and then you have to add the following entry:
As a reference, here you have a crontab entry parameters meaning:
This tutorial could also help you. | |||
|
feedback
|
|
man crontab will show you what you need. You'll want something like:
in your crontab file. Note that scripts under | |||
|
feedback
|
|
Thus something like
would upload files | |||
|
feedback
|
