How to keep an app running 100% of the ti…
apple Verified ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
I'd like to use a Mac Mini as a music server which would require iTunes running 100% of the time. I know how to add iTunes as a startup item, but if for some reason it crashes, I need it to restart on it's own.
Is there and automator app or actionscript I can make to keep the app running all the time?
Thanks
14 replies
Sign in or join Beachball Help to reply.
- 0
thomas_r. ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
I'm sure there's a way to automatically relaunch, though such things are never 100% reliable. I haven't needed such a tool since running a small server back in the System 7 days. Mac OS X is based on Unix, which was designed to run 24/7 on servers, so it shouldn't need this sort of thing.
I keep iTunes running at all times on a machine in my home, and it has never crashed. If iTunes (or your computer itself) is crashing, you should try to find out why and fix it rather than just slapping a band-aid on the problem.
- 0
Anthony Sbarro ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
I'm aware of the power and reliability of OS X Thomas. This is going to be running in a retail environment where the computer will be out of my hands and the people left to look after it are idiots.
I need a way to guarantee iTunes will be running 100% of the time - even in the case where someone quits the app unintentionally or intentionally.
- 0
thomas_r. ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Is this something you plan on running as a kiosk? How is it going to be used? If you can provide more info, someone may be able to provide the most ideal solution for your environment.
- 0
Anthony Sbarro ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
No.
As a music server.
No more detail is needed.I need a script that states "if iTunes crashes, run iTunes"
- 0
thomas_r. ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
No more detail is needed.
Of course it is. You seem to be concerned that someone will quit iTunes, in addition to crashing, which implies it is being used in an environment where employees, at least, have routine access to the machine itself. This is not the same as a server environment, where only a trained administrator would have access. What works in the latter environment may not work in the former.
However, since you're unwilling to provide more information, I wish you good luck finding someone who can provide you a literal answer to your question.
- 0
Anthony Sbarro ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Anything with a power button has the ability to be turned off or reset.
Any application has the ability to crash.
Any computer has the ability to crash.
I don't understand the need to know anything more than I need an application to run on a computer 100% of the time. Either you know how to do that or you don't. Clearly you do not Thomas.
- 0
bobwild ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
WOW !
You insult employes by calling them idiots and then tell us to come up with a solution for you without details.
I suggest you go figure out the script for yourself and don't bother to tell us how it works out with your idiots.
..Bob
- 0
Easybourne ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
A bit of a kludge, but how about writing a script to launch iTunes, save it a an automator action and have iCal launch it every 10 minutes.
So at the worst iTunes will out of action for 10 minutes?
- 0
Anthony Sbarro ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
If anyone is actually knowledgeable about the request I'd really appreciate it.
More than enough detail has been provided. If you think you need more information you do not understand the task at hand and should ignore this post.
Thanks =)
- 0
Anthony Sbarro ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Hey - now we're getting somewhere! =)
Sounds like a decent option if nothing else easybourne.
- 0
V.K. ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
you can make a launch daemon to do this. that's how it's done with dock and finder. they are automatically restarted by using launch daemons. first, remove itunes from login items. they will be started by the launch daemon.
make a plain text document with the following content
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>com.me.itunes</string>
<key>ProgramArguments</key>
<array>
<string>/Applications/iTunes.app/Contents/MacOS/iTunes</string>
</array>
<key>RunAtLoad</key>
<true/>
</plist>call it com.me.itunes.plist and save it in home directory/library/launchagents and log out/in. that's it. itunes will start automatically and if it quits for whatever reason it will restart.
- 0
Anthony Sbarro ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
I love you V.K. =D
I'll let you know how it works out for us.
- 0
Anthony Sbarro ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Doesn't look like this is working V.K.
Here's the string I'm seeing after a reboot.
3/5/10 12:01:58 PM com.apple.launchctl.Aqua[77] launchctl: no plist was returned for: /Users/username/Library/LaunchAgents/com.me.itunes.plistWhen you say home directory, you mean the user directory, right? Eitehr way, I've tried LaunchAgent in User/Library as well as HDD/Library/LaunchAgents and Launch Daemons.
Only thing I haven't tried was to create a LaunchDaemons folder in User/Library.
- 0
Anthony Sbarro ·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Nevermind, I found it!
Thanks for the help 🙂<dict> wasn't closed
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>com.me.itunes</string>
<key>ProgramArguments</key>
<array>
<string>/Applications/iTunes.app/Contents/MacOS/iTunes</string>
</array><key>RunAtLoad</key>
<true/>
</dict>
</plist>