The first time I tried to download Ubuntu Feisty Fawn back in 2007 I was using a 56 kbps dial-up connection. Upon clicking the download button, I was presented with a 50 hours remaining dialogue box.
I was using Internet Explorer 6’s inbuilt download manager and the file download kept failing and I had to restart it. Eventually after an hour or so I had to give up on what I later learnt was foolishness and used the Shipit option instead.
Even back then, most ISPs had an “unlimited dial-up internet” package not that it did customers any good considering the speed limitations of dial-up. It’s like telling me I can eat as much Chinese as I want at the Great Wall Restaurant as long as I am using chopsticks. I would probably starve.
Fast forward to today and the Ubuntu Shipit program has been closed for years and most Internet Providers now cite the speed in Mbps instead of kbps. There are still a few shameless people out there who can say “up to 256kbps” with a straight face and with not so much as a hint of a blush and proceed to charge you tens of dollars for the “privilege”.
Anyway, this is an article about scheduling downloads. As you probably know some ISPs/IAPs have deals that allow you to make downloads during off-peak periods during the wee hours of day when normal people are asleep as a means of trying to entice you to make use of their idle capacity during these hours.
Econet’s Dream bundles are an example. These deals are especially useful if you want to, say, download your favourite Linux distro or even the Windows 10 iso. The latest Ubuntu LTS is just under 1GB in size which means in theory you can get it just for $1.
Now we will look at how you can download the files
- For the methods below to work, you will need the download links for the files that you want to download. Often when downloading people make use of the so-called one-click file hosters such as Uploading.net and Uptobox.com. These services give you a file sharing link which requires you to navigate through a lot of ads to get to the actual download page. The download link usually expires after a few (4-8 hours) and some will not even work when accessed through another IP which is not uncommon when you are using a shared internet connection. Most one click hosters have a premium paid option which has fewer restrictions. You should consider getting a premium account. Alternatively you can make use of the so-called leech accounts that allow you to access multiple one-click hosters for a single fee. This is sort of a grey area so tread with caution and as always it is up to you to make sure that you are not violating other people’s copyrights.
- Make sure your device is showing the correct time. In windows go to the time tab in the system tray, click on date and time, make sure that you are in the +2 GMT time zone, go to the Internet time tab, click on Change settings, click on update now and then OK. Auto scheduling downloads only works if your device time is correct otherwise terrible things will happen if auto scheduling goes off at the wrong time. On Ubuntu run the command:
>ntpdate -s ntp.ubuntu.com
- On Windows, you will need a download manager like the Free Download Manager (GPL) or a paid version of the Internet Download Manager. On Ubuntu, you will need to install the Aria download manager using the command:
sudo apt-get install aria2
- aria2 is available in the repositories of most Linux distros so you can just install it using the default installation command.
Scheduling Downloads in Windows
- If you are using IDM, go to the downloads menu, click on scheduler, select new queue, name the queue whatever you want, select the periodic synchronisation tab, check the “start download at” option and set the time when you want the download to start and end. I suggest you fact in a 30 minutes allowance i.e. for the Dream bundles this would mean the downloads should be set to start at 12:30 am and stop at 7:30 am. Once you are done add direct download links to the queue. Make sure to leave your computer on during the night and with download manager running.
- With FDM you should go to the Options menu option, click settings, select the time limit option and set the time to start to 12:00 am and 8:00 am. Add the file links you want to download and then click on the clock icon on the menu bar to refine the download schedule. Again you should give your downloads a 3o minute allowance.
- Using gedit create a text file and paste the direct links of the files which you want to download.
- Each url should be on its own line.
- Save the file.
- Open a terminal and type the command:
- If this is the first time you have run the command you will be asked to select your preferred editor. I strongly suggest you choose nano.
- Paste the text:
30 0 * * * /usr/bin/screen -S downloadsession -d -m -L aria2c -i /path/to/text/file
into the file taking care to replace /path/to/text/file with the actual text to the text file with the URLs you want to download.
- Press Ctrl+O and Enter to save, then press enter to move to the next line.
- Paste the command:
30 0,7 * * * /usr/bin/killall -qu aria2c
and save the file.
- Leave your computer on during the night at the appointed time the cron daemon will wake up and start aria2c in a screen session and log the output to screenlog.n where n is the “window” number. The second command is a brutally efficient way to make sure that aria2c does not continue to download after 7:30 am if you are utilising Dream Bundles. It kills aria2c quietly without making a fuss.
NB Editing Crontab is somewhat of a dark art. You can utilise the generate here if you are uncomfortable with the syntax.
I hope you find this useful. Personally I use rysnc myself but that guide will be for another day. As always comments are welcome
Image credit: inspirationalfeed.com