I'm not sure if this is a totally good idea but since I have limited download bandwidth during the day, I thought it would be sensible to try and do my updating during the night when I am essentially unlimited. Short of running things manually and being up at 1:00am I thought it would be handy to use crontab to schedule the update however, I can't find anything specifically covering this, apart from one to comments which might suggest it isn't possible anyway.
Questions are:
1. Is it possible
2. If so, how
3. Is it wise and what are the downsides
Thanks
Running update manager from crontab [answered]
Forum rules
LMDE 2 has reached end of support as of 1-1-2019
LMDE 2 has reached end of support as of 1-1-2019
Running update manager from crontab [answered]
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
-
- Level 4
- Posts: 357
- Joined: Fri Sep 17, 2010 9:55 pm
Re: Running update manager from crontab
Hi abtygwyn,
I believe what you are looking for is "unattended-upgrades". Fire up your favorite search engine and have a look at: debian unattended-upgrades.
Hope this helps.
I believe what you are looking for is "unattended-upgrades". Fire up your favorite search engine and have a look at: debian unattended-upgrades.
Hope this helps.
Re: Running update manager from crontab
Thanks but I don't think unattended upgrades is really what I'm looking for.GeneBenson wrote:Hi abtygwyn,
I believe what you are looking for is "unattended-upgrades". Fire up your favorite search engine and have a look at: debian unattended-upgrades.
Hope this helps.
I simply want a way of downloaded the files to be installed during a specific time, ie between the hours of 1:00am and 8:00am.
If I could run a command in crontab to do this, that would be ideal, it's just I don't know and can't seem to find the command line to get update manager to run. If anybody could paste that in as a reply, that would be more than helpful!
Re: Running update manager from crontab
Hello, abtygwyn.
From your own words
Unattended upgrades means that the system checks which software updates are available, downloads them and applies the updates, all this without any user intervention.
mintUpdate (the update manager) is an interactive GUI programme which will do virtually nothing without the user clicking OK, except checking which software updates are available.
So launching this GUI programme by cron will be of little use. It would not start downloading anything before you give it a GO.
This in turn defeats your idea that your cronjob should do the the whole job some time between 1:00 and 08:00 a.m.
In case you do not like the term "unattended upgrade" and in case you do not like fiddling around with the apt-get configuration in order to allow unattended upgrades, you might create a script which will be launched by cron every night at 01:00 am. The core of this script might be 2 simple commands like Note:
Kind regards,
Karl
From your own words
I conclude that GeneBenson is perfectly right: what you are looking for are unattended-upgrades.I simply want a way of downloaded the files to be installed during a specific time, ie between the hours of 1:00am and 8:00am.
Unattended upgrades means that the system checks which software updates are available, downloads them and applies the updates, all this without any user intervention.
mintUpdate (the update manager) is an interactive GUI programme which will do virtually nothing without the user clicking OK, except checking which software updates are available.
So launching this GUI programme by cron will be of little use. It would not start downloading anything before you give it a GO.
This in turn defeats your idea that your cronjob should do the the whole job some time between 1:00 and 08:00 a.m.
In case you do not like the term "unattended upgrade" and in case you do not like fiddling around with the apt-get configuration in order to allow unattended upgrades, you might create a script which will be launched by cron every night at 01:00 am. The core of this script might be 2 simple commands like
Code: Select all
apt-get update
apt-get dist-upgrade
- Both commands require root permissions. So the whole cronjob must be run by root.
- Error checking and logging should be added to such a script, else strange things might have happened without you ever noticing
- "apt-get dist-upgrade" will not honour any mintUpdate safety levels. I.e. if you have configure mintUpdate to display, download and install updates of safety levels 1, 2 and 3, apt-get will not care and install all available updates.
Code: Select all
apt-get update
apt-get --download-only dist-upgrade
Karl
Last edited by karlchen on Mon Jun 16, 2014 11:04 am, edited 2 times in total.
Reason: replaced "upgrade" by "dis-upgrade", because monsta explained that "upgrade" were not recommended on LMDE, see post below.
Reason: replaced "upgrade" by "dis-upgrade", because monsta explained that "upgrade" were not recommended on LMDE, see post below.
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 762 days now.
Lifeline
Re: Running update manager from crontab
Just a side note: apt-get upgrade is not recommended in LMDE, apt-get dist-upgrade must be used instead to achieve the same result as with LMDE's version of mintUpdate (mintupdate-debian, which is different from the main edition's mintUpdate).karlchen wrote:Code: Select all
apt-get update apt-get upgrade
Re: Running update manager from crontab
Arghh, sorry, monsta.
It happened again. Looking at the view of threads which I had been involved in I have overlooked the 4 letter word LMDE.
I'll correct my previous post accordingly.
Cheers,
Karl
It happened again. Looking at the view of threads which I had been involved in I have overlooked the 4 letter word LMDE.
I'll correct my previous post accordingly.
Cheers,
Karl
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 762 days now.
Lifeline
Re: Running update manager from crontab
Thanks all.karlchen wrote:Arghh, sorry, monsta.
It happened again. Looking at the view of threads which I had been involved in I have overlooked the 4 letter word LMDE.
I'll correct my previous post accordingly.
Cheers,
Karl
I think I get the drift that it's a customization too far. I'll either just eat into my normal download allowance or do the download when I'm in a wifi cafe
Thanks for the feedback though. At least I can stop trying to figure out something which isn't really feasible.
Last edited by abtygwyn on Tue Jun 17, 2014 5:51 am, edited 1 time in total.
Re: Running update manager from crontab
You certainly know your stuff Karl, your advise to someone else has helped me with a slightly different problemkarlchen wrote:
The core of this script might be 2 simple commands likeNote:Code: Select all
apt-get dist-upgrade
- Both commands require root permissions.
Kind regards,
Karl
The update 'shield' indicated I had some updates but clicking on it, entering password, etc. resulted in the update manager crashing with nothing updated.
I used terminal and pasted :
Code: Select all
sudo apt-get update
Code: Select all
sudo apt-get dist-upgrade
Thanks from me too!
Pete