What Is Crontab? — Commands, Syntax & Examples

*/30 * * * *

Every 30 minutes

Next 10 Executions

Times shown in UTC

  • Mon, May 18, 202608:30
  • Mon, May 18, 202609:00
  • Mon, May 18, 202609:30
  • Mon, May 18, 202610:00
  • Mon, May 18, 202610:30
  • Mon, May 18, 202611:00
  • Mon, May 18, 202611:30
  • Mon, May 18, 202612:00
  • Mon, May 18, 202612:30
  • Mon, May 18, 202613:00

Field Breakdown

*/30
Minute
Every 30 minutes
*
Hour
Every hour
*
Day of Month
Every day
*
Month
Every month
*
Day of Week
Every day of week

About This Schedule

Crontab (short for "cron table") refers to both the command used to manage cron schedules and the file where those schedules are stored. Each user on a Unix/Linux system has their own crontab file, edited with the crontab command.

The three most important crontab commands are: crontab -e (edit your crontab), crontab -l (list your current entries), and crontab -r (remove all entries — use with caution). Each line in a crontab file contains a cron expression followed by the command to run. For example: */30 * * * * /usr/bin/python3 /home/user/backup.py runs a backup script every 30 minutes.

There's also a system-wide crontab at /etc/crontab that includes an extra field for the username. Drop-in directories like /etc/cron.daily/, /etc/cron.hourly/, and /etc/cron.weekly/ provide shorthand for common schedules. Use SimpleCronTab to build the expression visually, then paste it into your crontab.

Frequently Asked Questions