Skip to content

Instantly share code, notes, and snippets.

@gyzerok
Forked from evancz/cron.md
Created January 4, 2018 19:30
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 gyzerok/70e9833f80f49984b7b40250d861a62d to your computer and use it in GitHub Desktop.
Save gyzerok/70e9833f80f49984b7b40250d861a62d 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