Skip to content

Instantly share code, notes, and snippets.

@timmahoney
Last active December 25, 2015 15:49
Show Gist options
  • Save timmahoney/7001246 to your computer and use it in GitHub Desktop.
Save timmahoney/7001246 to your computer and use it in GitHub Desktop.
Starter for a crontab. Copy this into your crontab in order to have a little cheat sheet for creating scheduled tasks.
[email protected]
# +------------------------- Minute of the Hour ( 0 - 59, * to run every minute )
# | +---------------------- Hour of the Day ( 0 - 23, * to run every hour )
# | | +------------------- Day of the Month ( 1 - 31, * to run every day )
# | | | +---------------- Month ( 1 - 12, * to run every month )
# | | | | +------------- Day of Week ( 0 - 7, Sunday is both 0 and 7, * to run every day )
# | | | | | +---------- User to run command as ( Defaults to the user that set up this crontab, Beware permissions! )
# | | | | | | +---- Command to Execute (
# | | | | | | |
* * * * * root /usr/bin/command.sh
# Notes and syntax
# ################
#
# Commands MUST be referenced with the full path. You should not assume your command will run without having the full path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment