Skip to content

Instantly share code, notes, and snippets.

Embed
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
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

This comment has been minimized.

Copy link
Owner Author

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
You can’t perform that action at this time.