What is "cron"

The name cron comes from the Greek "Chronos", meaning "time". Cron utility allows users to schedule tasks (cronjobs, commands or shell scripts) to run periodically at certain times or dates.

It is usually used to automate system maintenance or administration, but can be used for other generic tasks such as connecting to the Internet or downloading emails.

Format

 +---------------- minuto (0 - 59)
 |  +------------- hora (0 - 23)
 |  |  +---------- dia do mês  (1 - 31)
 |  |  |  +------- mês (1 - 12)
 |  |  |  |  +---- dia da semana (0 - 6) (Domingo=0 ou 7)
 |  |  |  |  |
 *  *  *  *  *  comando a executar

Basic commands

  • crontab -e Edit crontab.
  • crontab -l Show the current crontab information.

References