Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Possible Duplicate:
How to run a script at login/logout in OS X?

I have some external USB 2.0 hard drives and they obnoxiously spin down every minute or so. Then when I go to do something on my Mac, I have to wait for the drives to spin up and it delays my workflow quite a bit. I have been researching these problems for several months now with no easy answers. My Google-foo finally found a Terminal command as such:

sudo pmset -a spindown 0

This seems to work and my drives no longer spin down. However, I'd like to be able to somehow execute this command automatically if I ever restart my computer. Is there a way to do that? I'm on Mac OS X 10.8.2 Mountain Lion.

share|improve this question
add comment

marked as duplicate by slhck Jan 1 '13 at 19:54

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

up vote 2 down vote accepted

Copied from here: Running script upon login mac

  • Start Automator.app
  • Select "Application"
  • click "Show library" in the toolbar (if hidden)
  • Add "Run shell script" (from the Actions/Utilities)
  • Copy & paste your script into the window
  • Test it
  • Save somewhere, for example you can make an "Applications" folder in your HOME (you will get a your_name.app)
  • Go to System Preferences -> Accounts -> Login items
  • Add this app
share|improve this answer
    
Perfect, thanks! –  Danny Englander Jan 2 '13 at 14:51
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.