Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
Hi, I have a NAS DNS 323, I need to do is a script or working with CRON and LFTP to download files from an FTP server. I do not know linux and I am a novice at this from the command FUN PLUG. The idea is that the file is downloaded from the FTP server at a specific time. I do this from Telnet with LFTP but I have the computer on while downloading and my idea is to schedule the download with CRON and not have the computer on.
Is it possible?
Thanks
Last edited by cgallardo2004 (2011-04-10 15:20:29)
Offline
That's pretty simple to implement using cron and the wget binary that nearly all the fun_plug add-ons provide.
The syntax for wget is simply wget downloadurl so to download onto Volume_1 a file named foo.txt in the public/stuff directory at bar.com via anonymous ftp the command would be:
( cd /mnt/HD_a2;wget ftp://bar.com/public/stuff/foo.txt)
wget has a whole lot more options for downloading directories or even entire sites depending on what you want to download.
To run this automatically from cron, edit the cron configuration file using the "crontab -e" command. This will open the configuration file in the system default editor.
A line in the crontab file has multiple fields separated by whitespace. The fields are:minute,hour,day of month, month,day of week, command.
One gotcha that causes problems for most people just starting using cron is the environment is not set when a cron command is ran which means there is no PATH set at all, you will have to use the full path to the command (this example is done using fonz fun plug, the paths are different if your dns-323 is running alt-f or debian)
So for example to run the previous command every sunday at 2:00am the entry would look like:
0 2 * * sun (cd /mnt/HD_a2;/ffp/bin/wget ftp://bar.com/public/stuff/foo.txt)
There are also a good number of web based down loaders that run on the DNS-323 that can be configured from a web interface which tends to be simpler if you don't want to learn the command line.
Offline