Skip to content

Instantly share code, notes, and snippets.

@gyzerok
Forked from evancz/cron.md
Created Jan 4, 2018
Embed
What would you like to do?
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