[ubuntu-uk] Kroning Updates
mwild1 at gmail.com
Sat Aug 18 18:29:04 BST 2007
On 8/18/07, Ian Pascoe <softy.lofty.ilp at btinternet.com> wrote:
> How can I set up a kron job or similar that will automatically update the
> machine without the necessity of her either using Update Manager or the
> Ideally so that it runs weekly.
This should be as simple as adding a weekly cron that runs "apt-get
Being a laptop, it would probably be best to use anacron to do this. The
standard cron will skip jobs if they occurred when the machine was not
switched on. anacron would instead run the command as soon as the system
starts back up.
As I understand, Ubuntu already uses anacron by default, so no work needs to
be done here (someone correct me if I'm wrong).
sudo nano /etc/cron.weekly/system_update
Add this text:
# Update the system
/usr/bin/apt-get -q -y upgrade
Then press Ctrl+O to save the file, then Ctrl+X to exit
The -q makes apt-get strip unnecessary output, and -y will answer "yes" to
any questions it would usually ask.
Also, an apt-get update would necessary to download the index of packages
(which tells Ubuntu the current versions), but I believe this is already
done automatically in Ubuntu, just after start-up.
sudo chmod 755 /etc/cron.weekly/system_update
Hope this helps,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ubuntu-uk