Skip to content

Instantly share code, notes, and snippets.

@wesleyit
Created September 26, 2014 20:03
Show Gist options
  • Select an option

  • Save wesleyit/2ca2af48668240691e84 to your computer and use it in GitHub Desktop.

Select an option

Save wesleyit/2ca2af48668240691e84 to your computer and use it in GitHub Desktop.
A default crontab header that will make the life easier for those who don't remember cron fields or keywords.
## CRONTAB HINTS AND TIPS
##
##
## Entry Description Equivalent To
## @yearly (or @annually) Run once a year at midnight in the morning of January 1 0 0 1 1 *
## @monthly Run once a month at midnight in the morning of the first of the month 0 0 1 * *
## @weekly Run once a week at midnight in the morning of Sunday 0 0 * * 0
## @daily Run once a day at midnight 0 0 * * *
## @hourly Run once an hour at the beginning of the hour 0 * * * *
## @reboot Run at startup @reboot
##
## * * * * * command to be executed
## ┬ ┬ ┬ ┬ ┬
## │ │ │ │ │
## │ │ │ │ │
## │ │ │ │ └───── day of week (0 - 7) (0 or 7 are Sunday, or use names)
## │ │ │ └────────── month (1 - 12)
## │ │ └─────────────── day of month (1 - 31)
## │ └──────────────────── hour (0 - 23)
## └───────────────────────── min (0 - 59)
##
##
##
## The following example will run each 10 minutes
## */10 * * * * /usr/bin/somedirectory/somecommand
## Disable E-mail notifications
MAILTO=""
## Set where to look for executable files
PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/sbin:/usr/local/bin:$PATH
## Ok, we are ready to go. Put your schedules below :-)
@raceboyer
Copy link
Copy Markdown

this has come in handy so many times!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment