Another bit of AppleScript hackery, this one will kill a defined application / process based on a defined schedule (every x hours) and restart the application / process after a slight delay.
repeat delay 7200 set app_name to "PROCESS NAME" set the_pid to (do shell script "ps ax | grep " & (quoted form of app_name) & " | grep -v grep | awk '{print $1}'") if the_pid is not "" then do shell script ("kill -9 " & the_pid) delay 30 tell application app_name to activate end repeat
You can find the application / process name by looking in Activity Monitor app.
Tweak the first delay parameter (in seconds) to suit your needs – the above will kill and restart the application / process every 2 hours (with a 30 second delay in-between killing and restarting).
Found this useful? Why not become a fan on facebook, or say hello on twitter?
Polymath. Serial entrepreneur turned VC, now sitting on both sides of the table, talking tech, finance, and motorbikes.