Crontab

by Scott, Revised on January 3, 2013 (Linux)

Open up the crontab editor:

crontab -e

The command displays a set of fields which are:

  1. The number of minutes after the hour (0 to 59)
  2. The hour in military time (24 hour) format (0 to 23)
  3. The day of the month (1 to 31)
  4. The month (1 to 12)
  5. The day of the week (0 or 7 is Sun, or use name)
  6. The command to run

Run the backup.sh script 10 minutes after 1:00 AM everyday for every month

10  1   *  *   * /home/me/scripts/backup.sh

Which means: Run the backup.sh script 10 minutes after 1:00 AM every Monday for every month.

Tags: Linux