Cron Job Download New Version of File
Hello, I need some help on how to download a file using a cron job.
I need to download a file from an ftp address on a separate server, get the file and put it in a particular directory on the server. I also only want to grab the file if the version on the FTP server is newer than the version on my server.
I am currently able to pull the file into the required directory but cannot get it to only do this if the file is newer, the command line I am using is:
Could someone tell me how I can do that please?
wget ftp://ftpaddress/data/item_import_prod_features.txt -O /serveraddress/item_import_prod_features.txtCould someone tell me how I can do that please?
-
Hello :) You could use cURL as documented here: [url=http://curl.haxx.se/docs/manual.html]cURL - Manual Search for the term "remote file is newer" in your browser on the above page to see which commands are available. Thank you. 0
Please sign in to leave a comment.
Comments
1 comment