MacOS Sit-Stand Notifications
I’ve had a sit/stand desk at home for a year. They been available at the office for more than six. However, I infrequently use the stand feature. My back may be hurting. The person who used it before me left it in a standing position. I’ll jump on the health train for a minute saying it’s good for me to forget it day later. My hypothesis is that I need to remove the thinking from my day and tell myself when to change positions.
My alert fatigued brain is already going, “Not another one!” So, I need to make this as fine tuned as I can. First, it must only appear on my work computer during the day. This rules out Slack which I also have a need (that I don’t heed enough) to mute from time to time. Since this is a work computer, I also wanted to limit yet another niche app from the internet. This lead me to using Automator. To run my custom app, I ended up using CronTab over the recommended LaunchD.
Create an Automator “App”
Though I barely scratched the surface, Automater seems pretty capable of doing what it’s name implies: automating tasks and stringing them into workflows. The online documentation lacks library details, but it was pretty intuitive to create a new workflow, add a system notification action with a custom message, and save it as a MacOS app. Clicking on the final .app file immediately fires my notification to “Change Desk Position”.
Set Up CronTab
Yes, Apple recommends using LaunchD, but surprise, it doesn’t have the versatility without the verbosity of enumerating every notification time for a week. Maybe, someday, I’ll script the generation. CronTab has fewer steps to set up as well. But, this is a post about getting something functional, not perfect. To open the config file, type:
crontab -e
For this notification, I wanted pinged every hour from 9 to 4 on weekdays. That line looks like this in the
0 9-16 * * 1-5 open ~/<Path to ICloud>/<Automator Folder>/<"App" Name>.app
And that’s pretty much it. I did have to debug spaces in the path and using open
to keep the cron from treating the .app as the folder it really is behind the scenes. Now I’ve got a notification that will follow me to and from the office but not onto my personal devices. It’s only been one day so far, but there was a lot more standing.