Here is how:
1. On your linux machine where the files are generated create a .netrc_template file containing the commands for the ftp:
2. Make a small script to generate the file name, the .netrc and to run the task on a daily basemachine ftp.xxx login xxx password xxx macdefinitlcd /localdircd /webdirprompt offbinmput ILFILEquit<here you need an empty line>
#!/bin/shNOME=`/bin/date +"ilFile%Y%m%d.pdf"`cat /home/alex/.netrc_tmpl |sed -e "s%ILFILE%$NOME%">/home/alex/.netrcchown alex /home/alex/.netrcchmod 600 /home/alex/.netrcftp ftp.xxx
3. add the script to a crontab
#crontab -l
0 8 * * * /home/alex/my.cron >/dev/null 2>&1
No comments:
Post a Comment