Run a cron command every 10 minutes 🐧

Run a cron command every 10 minutes 🐧

Summary:

In this post I’ll show you how to run a cronjob every 10 minutes.

Cron is a time-based job scheduler in Unix-like computer operating systems that allows you to run processes at specific periods of time. In this post I’ll show you how to run a cronjob every 10 minutes.

The crontab format is minute – hour – day of month – month – day of week followed by the command to run. You can also use * which matches any value.

crontab-every-10-minutes
crontab-every-10-minutes

To fire a cronjob command every 10 minutes we will schedule it to run every hour at 10, 20, 30, 40, and 50th minute:

0,10,20,30,40,50 * * * * /path/to/command

We can also simplify the syntax like this:

*/10 * * * * /path/to/command

The */10 token will fire the cronjob every 10th minute.

whoami
Stefan Pejcic
Join the discussion

I enjoy constructive responses and professional comments to my posts, and invite anyone to comment or link to my site.