Skip to content

Instantly share code, notes, and snippets.

@hopsoft
Last active January 13, 2024 13:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hopsoft/3891062 to your computer and use it in GitHub Desktop.
Save hopsoft/3891062 to your computer and use it in GitHub Desktop.
Cron Cheat Sheet

Cron Cheat Sheet

sudo crontab -e
# Example of job definition:
# .---------------- minute (0 - 59)
# |  .------------- hour (0 - 23)
# |  |  .---------- day of month (1 - 31)
# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# |  |  |  |  |
# *  *  *  *  * user-name command to be executed
# [minute] [hour] [day] [month] [week day] [command to be executed]
#    *       *      *      *        *
#    |       |      |      |        |
#    |       |      |      |        +------ day of week (0-6) (Sunday=0)
#    |       |      |      |
#    |       |      |      +--------------- month (1-12)
#    |       |      |
#    |       |      +---------------------- day of month (1-31)
#    |       |
#    |       +----------------------------- hour (0-23)
#    |
#    +------------------------------------- min (0-59)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment