/restart-slack

[Unmaintained Software] “Restarting Slack every few hours can really help to improve performance.” — Slack's support team (via email)

The UnlicenseUnlicense

No Maintenance Intended

I no longer maintain this software. It might still be useful for you, but I can't provide help for it.


restart-slack

This collection of components for OS X allows you to automatically and unobstrusively restart Slack periodically.

AppleScript

The AppleScript Restart Slack if Not Frontmost.scpt handles the task of restarting Slack. It takes care not to restart Slack when its window is focused on screen. While you're focusing on something else, Slack can restart without loss of data.

It depends on Slack being installed at /Applications/Slack.app, which is the normal spot for it.

plist

cdz.restartslack.plist is a Launch Agent which schedules the periodic task of restarting Slack.

Installing and configuring

Place the file Restart Slack if Not Frontmost.scpt in a directory like ~/Applications.

Place the file cdz.restartslack.plist in ~/Library/LaunchAgents. You’ll first want to edit it so that it points to the correct Restart Slack if Not Frontmost.scpt path.

Run the command launchctl load cdz.restartslack.plist to set up the task.

Uninstalling

Run the command launchctl unload cdz.restartslack.plist to unload the task. Then remove Restart Slack if Not Frontmost.scpt from ~/Applications, and cdz.restartslack.plist from ~/Library/LaunchAgents.

Additional Tools & Reference

License

The Unlicense; see LICENSE.txt.