This article originally appeared in TidBITS on 2010-01-08 at 9:08 a.m.
The permanent URL for this article is: http://tidbits.com/article/10895
Include images: Off

How to Schedule Software Update Downloads

by Chris Pepper

After Jeff Carlson's article "Gutenprint Updates Printer Drivers without a Lot of Bandwidth [1]" (2 January 2010), readers suggested a few alternatives to the core problem he ran into: the HughesNet bandwidth cap during all but late-night hours. The solution is obviously to schedule Software Update to download updates only during the few unlimited hours that HughesNet allows during the middle of the night - something that appears impossible using Apple's Software Update preference pane. Here's an overview of possible solutions in case you find yourself in a similar situation.


Macworld's Suggestion -- In an article in Macworld [2], Chris Breen pointed out that when you click the Check Now button in System Preferences > Software Update, the system automatically schedules future checks to start at that time. So if you click the button at 11:10 PM, future automatic checks will also occur at 11:10 PM - assuming the Mac is on and not sleeping.

To avoid staying up late to retrain Software Update, just reset the time appropriately in the Date & Time preference pane, and then click the Check Now button in the Software Update preference pane, as I've done in the screenshot. When you're done, reselect the "Set date and time automatically" checkbox in Date & Time. Remember that if you ever click Software Update's Check Now button manually at some other time of day in the future, you'll have to repeat these steps to retrain Software Update for its late-night checks.

[image link] [3]

Note that on all current Mac models, the Energy Saver pane in System Preferences includes a Schedule button, which you can click to bring up an interface for configuring the Mac to turn itself on or wake up automatically.


The Command Line Answer -- As a Unix user, I'd use Apple's "softwareupdate" command in Terminal to download Apple's updates, and the standard Unix cron tool to schedule when it runs. Every minute the cron program checks a list of scheduled "cron jobs," and executes any that match the current time. Wikipedia [4] has full details about cron, and Apple has several [5] useful manual pages [6] that will help if you want to go this route.

The command

softwareupdate --download --all

will download all outstanding updates, but not install them. This is suitable for running nightly at 11:10 PM on a HughesNet connection, as the download should be completed by 4 AM (when HughesNet reactivates bandwidth caps). If the download fails, the Mac will simply try again next time.

If you're comfortable with Unix, you can simply use "crontab -e" (or "EDITOR=nano crontab -e" if you dislike the default vi editor). Then add an entry like this to download any outstanding updates at 11:10 PM daily (and skip sending a status email each time):

10 23 * * * /usr/sbin/softwareupdate --download --all >> /dev/null

Each update appears in your default Downloads folder as a folder containing a package and a ".dist" alias. Simply open the folder and double-click the .dist file to run the updater.


The Manual Option -- Of course, you can also download updates manually from Apple. A TidBITS reader wrote in to suggest downloading required updates from the Apple Support Downloads page [7], either with a Web browser or a scheduling downloader such as Speed Download [8].

This approach is particularly useful if you're caring for multiple Macs, since one installer can be used on all of them - as compared to Software Update, which downloads each updater independently on each Mac.

Manually downloading updates also makes sense if you have a fast connection (perhaps at work, at a friend's house, at a coffee house, or at a public library; see "Find Free and Inexpensive Wi-Fi [9]," 23 December 2009) and can easily burn CDs or DVDs for Macs with slow or limited connectivity.


In The End -- Whether you choose to reschedule Software Update from System Preferences, work through the command line, or install updates manually, download caps imposed by certain service providers needn't prevent you from keeping your Mac healthy and up-to-date.

[1]: http://db.tidbits.com/article/10875
[2]: http://www.macworld.com/article/139860/2009/04/schedulesoftwareupdate.html
[3]: http://www.tidbits.com/resources/2010-01/Software-Update-at-night.png
[4]: http://en.wikipedia.org/wiki/Cron
[5]: http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man5/crontab.5.html
[6]: http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man1/crontab.1.html
[7]: http://support.apple.com/en_US/downloads
[8]: http://yazsoft.com/products/speed-download/information/
[9]: http://db.tidbits.com/article/10872