1

I would like to be able to schedule software updates to run during the time when my Internet data usage is free. I have tried to figure out how to use Automator and/or iCal to do this, but I am not knowledgable enough.

1
  • 1
    What did you try in Automator, that is probably the best place to start and knowing what you tried might be helpful. Thanks!
    – nerdwaller
    Nov 2, 2012 at 18:52

1 Answer 1

1

I am not sure which version of OSX you are on, however, for Snow Leopard the command was:

$ softwareupdate -iva (in the terminal)

Secure Route (probably recommended for you)

Open Automator -> Select Calendar Alarm -> Navigate to the Utilities (left menu) and Run AppleScript in the middle column.

do shell script "softwareupdate -iva" with administrator privileges

After that, test that it works with the little play button in the top left of the right column. After you save it, then you should be able to set that up in iCal as an alert. Now this will require you to enter your password when you run it, so automating it isn't necessarily the best since you'd need to be there.

Insecure Route (probably not recommended for you)

If you want to run it without being prompted, you can save your credentials there; however, it is insecure and probably not the best idea. That is because anyone who has access to your computer (either physically or electronically) could see this. If you choose that option, I am not responsible for it.

To set that part up, put the below in the code instead.

do shell script "softwareupdate -iva" username "YourUserName" password "YourPassword" with administrator privileges

Again - doing that can be dangerous. Sometimes the save option allows you to save the "app" as a read-only file - which helps a little with security, but not loads.

Here is my source.

You must log in to answer this question.

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