Hello Mac fans,
Minor niggle here. I am trying to run Software Update from the command line so that I can automate it to run in the middle of the night, to use my of-peak download quota.
I have set up an Automator task to do this (attached). The problem is, it doesn't really work properly. The situation is this:
1) if I enter "softwareupdate -l" [this just lists available updates] in the shell script part of the Automator workflow, it works just fine and completes, leaving a log file saying so.
2) If I enter "softwareupdate -i -a (or -r) [install all (or recommended) updates), when there are updates available the workflow appears to hang after it has downloaded, but not installed, the first update in the list. I know this from looking at Activity Monitor while the workflow is running. It downloads, then all disk/network activity stops. The workflow never completes.
3) If I enter "softwareupdate -i -a (or -r) [install all (or recommended) updates), when there are no updates available, the workflow completes.
4) If I execute any of the above softwareupdate commands directly from Terminal myself, they all work and complete properly, installing updates as required.
So my question is: why does it behave properly when I run it manually from the command prompt, or when there are no updates available as part of the Automator workflow, but not otherwise?
I have edited the sudoers etc file so that I do not have to enter my password when running "sudo softwareupdate". Are there additional changes I have to make or commands to enter? I just can't figure out why it works when I type it in myself.
Any help much appreciated.
Minor niggle here. I am trying to run Software Update from the command line so that I can automate it to run in the middle of the night, to use my of-peak download quota.
I have set up an Automator task to do this (attached). The problem is, it doesn't really work properly. The situation is this:
1) if I enter "softwareupdate -l" [this just lists available updates] in the shell script part of the Automator workflow, it works just fine and completes, leaving a log file saying so.
2) If I enter "softwareupdate -i -a (or -r) [install all (or recommended) updates), when there are updates available the workflow appears to hang after it has downloaded, but not installed, the first update in the list. I know this from looking at Activity Monitor while the workflow is running. It downloads, then all disk/network activity stops. The workflow never completes.
3) If I enter "softwareupdate -i -a (or -r) [install all (or recommended) updates), when there are no updates available, the workflow completes.
4) If I execute any of the above softwareupdate commands directly from Terminal myself, they all work and complete properly, installing updates as required.
So my question is: why does it behave properly when I run it manually from the command prompt, or when there are no updates available as part of the Automator workflow, but not otherwise?
I have edited the sudoers etc file so that I do not have to enter my password when running "sudo softwareupdate". Are there additional changes I have to make or commands to enter? I just can't figure out why it works when I type it in myself.
Any help much appreciated.