Can a Cron job be set up to FTP?
Hi, I've been learning how to set up cron jobs. Before I do more research, can a cron job be set up to do a FTP job? FTP the files in a folder to an external folder?
Thank you
-
Yes it is possible. 0 -
Yep, entirely possible, you'd make a bash script with the information you wanted for the FTP login, then create the cron. Something like the following: [QUOTE=https://www.linuxquestions.org/questions/aix-43/setting-up-a-cron-for-transferring-a-file-through-ftp-at-5-pm-daily-934622/] #!/bin/bash filename="/home//thefile" hostname="ftp.myhost.com" username="username" password="password" ftp -un $hostname <
Then add the cron job0
Please sign in to leave a comment.
Comments
2 comments