Foreword : Inspired by excellent post
Initial task: creating notification every 20 minutes can be decomposed into two parts:
- create notification
- scheduled launch
First subtask can be solved using this trivial script.
standup.sh:
#!/bin/sh
# stand up notification
osascript -e 'display notification "Stand up" with title "Healthy programmer"'
say "Stand up"
Second subtask (scheduled launch) can be solved using: daemon and agent mechanism.
Create file: com.example.stand.up.plist and place it into ~/Library/LaunchAgents/.