Skip to content

Instantly share code, notes, and snippets.

@sadikay
Created March 17, 2017 17:36
Show Gist options
  • Save sadikay/2e4f080bd2abb55f927d10ea8f65d577 to your computer and use it in GitHub Desktop.
Save sadikay/2e4f080bd2abb55f927d10ea8f65d577 to your computer and use it in GitHub Desktop.
Schedule reminder with notifications on mac os terminal
# brew install terminal-notifier
# gem install rufus-scheduler
# type `irb`
require 'rufus-scheduler'
ENV['TZ'] = 'UTC'
period = '*/10 * * * *' # every 10 minutes cron
scheduler = Rufus::Scheduler.new
scheduler.cron period do
`echo 'Piped Message Data!' | terminal-notifier -sound default`
end
# for more:
# https://github.com/julienXX/terminal-notifier
# https://github.com/jmettraux/rufus-scheduler#readme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment