Skip to content

Instantly share code, notes, and snippets.

@jondlm
Created December 18, 2017 18:34
Show Gist options
  • Save jondlm/9260af123a07b774503930080dc631b4 to your computer and use it in GitHub Desktop.
Save jondlm/9260af123a07b774503930080dc631b4 to your computer and use it in GitHub Desktop.
Somtimes I forget to open Outlook in the morning, this helps as a cron task
#!/usr/bin/env bash
# vim: set syntax=sh
ps aux | grep -v "grep" | grep "Microsoft Outlook" > /dev/null
outlook_ret=$?
day=`date +%u`
# Make sure it's a weekday and Outlook is running
if [ "$day" -ge 1 -a "$day" -le 5 -a "$outlook_ret" -gt 0 ]; then
osascript -e 'display notification "Please start Outlook" with title "Nag Bot"'
fi
@jondlm
Copy link
Author

jondlm commented Dec 18, 2017

Only runs on a Mac with gdate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment