Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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
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"'
Copy link

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