Cron

The software utility cron is a time-based job scheduler in Unix-like computer operating systems. People who set up and maintain software environments use cron to schedule jobs (commands or shell scripts) to run periodically at fixed times, dates, or intervals. It typically automates system maintenance or administration—though its general-purpose nature makes it useful for things like connecting to the Internet and downloading email at regular intervals.

Cron is driven by a crontab (cron table) file, a configuration file that specifies shell commands to run periodically on a given schedule. The crontab files are stored where the lists of jobs and other instructions to the cron daemon are kept. Users can have their own individual crontab files and often there is a system wide crontab file (usually in /etc or a subdirectory of /etc) that only system administrators can edit.

  *  *  *  *  *  command to execute
  ┬  ┬  ┬  ┬  ┬
  │  │  │  │  │
  │  │  │  │  │
  │  │  │  │  └──── day of week (0 - 6) (0 to 6 are Sunday to Saturday, or use names)
  │  │  │  └─────── month (1 - 12)
  │  │  └────────── day of month (1 - 31)
  │  └───────────── hour (0 - 23)
  └──────────────── min (0 - 59)

See Also

Revisions

Top Editors
Recently Edited Articles