DebAWeek: cron-apt
The package cron-apt is a great example of powerful flexibility. By default, once the package is installed, a cron job is set to run at 4am to check for new packages (apt-get update) and download any new packages (apt-get dist-upgrade -d. Of course, running at 4am is good for servers (unless you want them to check for updates more frequently) but the average desktop user may not have their computer on at that time.
And that’s my biggest complaint is with cron-apt is that the defaults aren’t quite sensible enough for the desktop user. I even usually have my servers check for updates hourly. If instead of a file in /etc/cron.d/ cron-apt had created a /etc/cron.daily/ entry that would have been preferable if combined with the anacron package. That would allow computers which were powered off when the program would ordinarily run to catch up buy running on the next boot.
Of course this is trivial to fix in any number of ways. One could edit /etc/dron.d/cron-apt and change the line
“0 4 * * * root test -x /usr/sbin/cron-apt && /usr/sbin/cron-apt” to “0 * * * * root test -x /usr/sbin/cron-apt && /usr/sbin/cron-apt”. One could also just create a symlink to /usr/sbin/cron-apt in /etc/cron.hourly/.
Of course one of the great things about cron-apt is how configurable it is. It can be configured to run any apt-get or aptitude command and set to mail or log the output as needed. The /etc/cron-apt/ directory has a number of sub directories for dropping in scripts and configuration files. Though for most users, the defaults will work just fine, once the scheduling is setup properly.
cron-apt
Contains a tool that is run by a cron job at regular intervals. By default it
just updates the package list and download new packages without installing.
You can instruct it to run anything that you can do with apt-get
(or aptitude).
.
It can optionally sends mail to the system administrator on errors, log
to syslog or a separate log file.
.
Observe that this tool may be a security risk, so you should not set it
to do more than necessary. Automatic upgrade of all packages is NOT
recommended unless you are in full control of the package repository.




Recent comments
9 weeks 15 hours ago
12 weeks 4 days ago
14 weeks 3 days ago
14 weeks 5 days ago
17 weeks 6 days ago
22 weeks 5 days ago
27 weeks 3 days ago
31 weeks 1 day ago
36 weeks 5 days ago
38 weeks 1 day ago