Skip to content

Instantly share code, notes, and snippets.

@remarkablemark
Created October 13, 2018 04:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save remarkablemark/95cdb3310e00b8bbf6a57ea59a60f53a to your computer and use it in GitHub Desktop.
Save remarkablemark/95cdb3310e00b8bbf6a57ea59a60f53a to your computer and use it in GitHub Desktop.
crontab cheatsheet

crontab cheatsheet

crontab

Crontab syntax taken from guide:

* * * * * command
│ │ │ │ │
│ │ │ │ └─── day of week (0 - 6) (0 = Sunday, 6 = Saturday)
│ │ │ └──────── month (1 - 12)
│ │ └───────────── day of month (1 - 31)
│ └────────────────── hour (0 - 23)
└─────────────────────── min (0 - 59)

list

List crontab:

$ crontab -l

edit

Edit crontab:

$ crontab -e

To open crontab with a preferred editor like nano:

$ EDITOR=nano crontab -e

remove

Remove crontab:

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