# Cron

### Crontabs

A crontab is a file that's utilised by the cron process to execute each line of instructions.\
Crontabs need 6 values in-order to work:

| Value | Description                                     |
| ----- | ----------------------------------------------- |
| MIN   | What minute to execute at                       |
| HOUR  | What hour to execute at                         |
| DOM   | What **D**ay **O**f the **M**onth to execute at |
| MON   | What **M**onth **O**f the **Y**ear to execute a |
| DOW   | What **D**ay **O**f the **W**eek to execute at  |
| CMD   | The actual command that'll get executed         |
| \*    | NULL                                            |

<figure><img src="https://2647484537-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtaRkDPLbF1LZ2GtI5UCq%2Fuploads%2F3JY9dQIlzKbgYmfAzfrp%2Fimage.png?alt=media&#x26;token=6c821e8d-581f-42cd-b0d7-a35d62195c2c" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2647484537-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtaRkDPLbF1LZ2GtI5UCq%2Fuploads%2F8g7orVbIgEkB4gIMLtYq%2Fimage.png?alt=media&#x26;token=9e09b35e-b68a-4ab8-8f94-334ad867fd03" alt=""><figcaption></figcaption></figure>

Once you're done, click generate and paste the output into your crontab editor

<figure><img src="https://2647484537-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtaRkDPLbF1LZ2GtI5UCq%2Fuploads%2FKgiJ04NmUiFUOb8K5Dtm%2Fimage.png?alt=media&#x26;token=a959330b-ccfa-4690-b61f-c216407b2275" alt=""><figcaption></figcaption></figure>

Press `Ctrl + X` to save on Nano, or `:wq` on Vim. That's it!\
If you want to remove your saved crontabs, you can run `crontab -r`.
