Schedule downloads, mint & program updates?
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Schedule downloads, mint & program updates?
Is there any way of scheduling downloads, Mint and program updates rather than doing it immediately? I am entitled to free downloads in the wee hours of the morning and if I can schedule accordingly I can save on the bandwidth use.., of course it should be automatic so that I do not have to be there. Thanks in advance.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time 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.
Re: Schedule downloads, mint & program updates?
Yes, this is what tools like cron are for. In the /etc/ directory there are a few directories with the name cron in them. cron.hourly, cron.daily, cron.weekly and cron.monthly. All of the programs in these directories get run once every ... hour, day, week, month respectively.
To make sure your updates run once a day, create a new file in the /etc/cron.daily folder and put this in the file
#!/bin/bash
apt-get update
apt-get upgrade
Save the file and make sure it has execute permission
chmod 755 /etc/cron.daily/update_script
That will refresh your package list and run any available updates.
In the /etc/crontab file you'll see a line like this:
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
Change the second number (6 in this case) to the hour you want the update script to run. For example, make it a 3, to run the script at 3am.
To make sure your updates run once a day, create a new file in the /etc/cron.daily folder and put this in the file
#!/bin/bash
apt-get update
apt-get upgrade
Save the file and make sure it has execute permission
chmod 755 /etc/cron.daily/update_script
That will refresh your package list and run any available updates.
In the /etc/crontab file you'll see a line like this:
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
Change the second number (6 in this case) to the hour you want the update script to run. For example, make it a 3, to run the script at 3am.