Skip to content

Instantly share code, notes, and snippets.

@mondaini
Created September 19, 2014 19:09
Show Gist options
  • Save mondaini/d8362e764f63e32b8472 to your computer and use it in GitHub Desktop.
Save mondaini/d8362e764f63e32b8472 to your computer and use it in GitHub Desktop.
Cron Protip
Execute um crontab -e para abrir o crontab no editor de texto e cole o texto abaixo no início do arquivo:
## 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
## Pronto! Coloque suas coisas daqui para baixo :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment