How can I use cron-apt to download and install updates between midnight and 5am?
Solution 1:
Actually the documentation of cron-apt is pretty thorough. You can find the documentation and examples in /usr/share/doc/cron-apt. If you don't intent to read it, you can easily just set up a root cronjob yourself (without using cron-apt).
You can open the crontab of the root-user with sudo crontab -e
. Now just add something like this:
# m h dom mon dow command
0 1 * * * /usr/bin/apt-get update && /usr/bin/apt-get -y dist-upgrade
Make sure there is an empty line at the end of the file and save it. The dist-upgrade makes sure, that upgrade go through, even packages need to be removed to install upgrades to other packages. If you don't want to risk that, leave it at upgrade. If you add the -d option to the upgrade command, packages will only be downloaded and not installed. Check out man apt-get
for more options.