Jump to content
Sign in to follow this  
Arup

How to schedule downloading updates or packages?

Recommended Posts

Hi,

I've a limited bandwidth net connection. There is unlimited download available only between 2-00AM to 8-00AM.

So my question is how can I schedule updates or package installation so that it starts automatically after 2-00AM without my intervention?

 

 

[moved from Software by spinynorman]

Share this post


Link to post
Share on other sites

You can put a job in /etc/cron.daily to do this for you - this would start at 3.00am or 4.00am I can't remember how it's set up on Mandriva by default. Job would be something like:

 

#!/bin/bash
#
# Updates system

# sync repos so that they have new package list
urpmi.update -a

# update full system
urpmi --auto-select --auto

 

then you save this as /etc/cron.daily/sysupdates or whatever filename you like instead of sysupdates, and then do:

 

chmod +x /etc/cron.daily/sysupdates

 

to make it executable. It's important to add the #!/bin/bash at the beginning or your job will never run - I found this once, even though I could run it manually.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...