Skip navigation.
 
mlRe: Keeping an App Alive
FROM : Sherm Pendley
DATE : Mon Jul 31 19:16:54 2006

On Jul 31, 2006, at 1:06 PM, Eric Blanpied wrote:

> I'm writing a Cocoa app that needs to run 24/7, and it's looking 
> pretty decent so far. Still, I'm thinking it would be prudent to 
> have some way of making sure it's always going, and automatically 
> restart it if it fails.
>
> Does anyone have advice on this?


You could schedule a script (with cron or launchd, depending on the 
OS version) to run every so often to check if it's running and if 
not, start it with "open".

Although frankly I'm not a big fan of such an approach. Blindly 
restarting an app without first determining the reason it failed is 
very rarely a useful thing to do. Quite often it will simply fail again.

sherm--

Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net

Related mailsAuthorDate
mlKeeping an App Alive Eric Blanpied Jul 31, 19:06
mlRe: Keeping an App Alive Sherm Pendley Jul 31, 19:16
mlRe: Keeping an App Alive Eric Blanpied Jul 31, 20:01
mlRe: Keeping an App Alive Robert Cerny Jul 31, 21:45