Skip to content

Instantly share code, notes, and snippets.

@kgashok
Forked from evancz/cron.md
Created December 17, 2017 02:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kgashok/223090d7ab39626c5d0f2e63fefa44ce to your computer and use it in GitHub Desktop.
Save kgashok/223090d7ab39626c5d0f2e63fefa44ce to your computer and use it in GitHub Desktop.
Cron job to remind myself to stretch

Type crontab -l to see your cron jobs. Type crontab -e to edit them. You have to use Vim apparently.

Add a line like this:

0,30	*	*	*	*	/Users/YOURNAME/Documents/scripts/stretch.sh

That is on every 0th and 30th minute of the hour. Make sure all the separators in there are tabs!

#!/bin/bash
# Nonvisual cue in a relatively non-robotic voice
say Time to stretch -v Tessa
# Buffer time to finish whatever thought
sleep 20
# Sleep the screen
pmset displaysleepnow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment