T
ToolPrime

Cron Expression for Every 5 Minutes

Run a cron job every 5 minutes using */5 * * * *. A popular interval for monitoring, cache refreshing, and queue processing.

Expression

*/5 * * * *

Every 5 minutes

Use Cases

Code Examples

Crontab

# Every 5 minutes
*/5 * * * * /path/to/your/script.sh

GitHub Actions

name: Scheduled Job
on:
  schedule:
    - cron: '*/5 * * * *'
jobs:
  run:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: echo "Running Every 5 Minutes"

systemd Timer

[Unit]
Description=Every 5 Minutes timer

[Timer]
OnCalendar=*-*-* *:*:00
Persistent=true

[Install]
WantedBy=timers.target

Tips

Frequently Asked Questions

What does */5 mean in cron?

The */ syntax means "every nth value." */5 in the minute field means every 5th minute: 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55.

Can I use 0,5,10,15,20,25,30,35,40,45,50,55 instead of */5?

Yes, both produce the same result. */5 is shorthand for listing every 5th minute and is easier to read.

Related Cron Expressions