3

I have free bandwidth everyday from 12 am till 7 am. That means I put everything that I want to download in the software center and go to sleep.

I want the download process to stop at 7 am. For that I have downloaded a tool that you can find in the software center called ComplexShutDown. It shuts down the PC.

That is not a good idea, software can be corrupted. Is there a better way to cancel or pause apt or software center at a certain time?

That can easily be done in Torrent downloaders or download managers, but sometimes, I am obliged to use apt or the software center. I prefer the software center simply because I can schedule apps to be installed. I don't know if that can be done with apt, well maybe && but not very convenient.

0

4 Answers 4

1

ip link set wlan0 down will disconnect your wifi as per http://linux.die.net/man/8/ip ; put that in a script. Let's call that nonet.scr.

Then, set up a timed job with at -f nonet.scr -t 0659 as per http://linux.die.net/man/1/at

Also create a script with ip link set wlan0 up in it to reconnect you after you have cancelled any pending downloads.

Make sure /etc/at.allow lists your username as per http://content.hccfl.edu/pollock/Unix/AtDemo.htm

1

you can write a script for that. Currently I am in a mobile so I can not give you the exact but I can give you most of it.

So you do as first start the software center and then kill it after 7 hours.

So for killing exactly after 7 hours you may need of using at command.

For killing you can use kill or pkill command.

That's it. You can start your software center at 12am and you can go to sleep. It will until 7 am and it will be killed.

Hope that helps

0

If it's not a headless system, and is on DHCP, you could release your DHCP ip in cron.

1
  • could you please expand your answer to include how to do this?
    – TrailRider
    Jan 17, 2014 at 2:22
0

if you pass your apt-get and software center via squid proxy, there is a time based acl you can use to filter apt-get and software center traffic with time limiting acl config, so the proxy simply will not let that traffic trough, while other progs will work fine.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .