Crontabs

The Crontabs are special files with formatting that are recognized by the cron process to execute each line step-by-step at a regular time. They can be broken down as follows:

  • MIN: What minute to execute at

  • HOUR: What hour to execute at

  • DOM: What day of the month to execute at

  • MON: What month of the year to execute at

  • DOW: What day of the week to execute at

  • CMD: The actual command that will be executed

$MIN $HOUR $DOM $MON $DOW $COM   #Example below
0 12 * * * cp -R /home/$user/Documents /var/backups/ #Do backup every 12 hours

The * let are used to skip specific values

Last updated