Crontab is a file containing instructions for the cron daemon. It is a job scheduler where you add commands to be executed at defined periods.

Edit existing crontab file, or make new one if it doesn’t exist:

crontab -e

List of cronjobs , display crontab file contents:

crontab -l

Removes the crontab file:

crontab -r

Time format in crontab

min (0-59)hour (0-23)day of the month (1-31)month (1-12)day of the week (0-6)
Sunday = 0

* is a wildcard, meaning any value from the given range

/ adds a step value

*/5 * * * *

This will be executed every 5 minutes.

0 18 * * 1-3

This will be executed at 18:00h on every day of the week from Monday to Wednesday.

Leave a Comment

Tested on Ubuntu & Pop OS