Skip to content

Instantly share code, notes, and snippets.

@beaudierman
Created November 5, 2013 18:14
Show Gist options
  • Save beaudierman/7323500 to your computer and use it in GitHub Desktop.
Save beaudierman/7323500 to your computer and use it in GitHub Desktop.
Helpful Crontab Variables - Source: http://krisjordan.com/essays/timesaving-crontab-tips
When your cron jobs have output, or, when they fail, email is sent to the following addresses
MAILTO="foo@bar.com,baz@qux.com"
The path of the user whose crontab you're setting up.
Use echo $PATH and copy the contents into the PATH variable
PATH="/usr/bin:/sbin:/bin"
The home directory that your crontab should be working in.
This can replace needing to cd /path/to/app/root in each script and using absolute paths.
HOME="/path/to/app/root"
The default shell that your crontab uses may differ from what you need.
Use echo $SHELL and copy the contents into the SHELL variable.
SHELL="/bin/bash"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment