Cron Expression for Every 30 Minutes
Run a cron job every 30 minutes using */30 * * * *. Perfect for semi-hourly tasks like database cleanup, digest emails, and status checks.
Expression
*/30 * * * * Every 30 minutes
Use Cases
- • Sending digest or summary emails
- • Running database maintenance or cleanup
- • Checking certificate expiration dates
- • Syncing inventory between platforms
Code Examples
Crontab
# Every 30 minutes
*/30 * * * * /path/to/your/script.sh GitHub Actions
name: Scheduled Job
on:
schedule:
- cron: '*/30 * * * *'
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: echo "Running Every 30 Minutes" systemd Timer
[Unit]
Description=Every 30 Minutes timer
[Timer]
OnCalendar=*-*-* *:*:00
Persistent=true
[Install]
WantedBy=timers.target Tips
- ✓ Runs at the top and bottom of every hour (:00 and :30)
- ✓ Equivalent to 0,30 * * * *
- ✓ A natural interval for semi-hourly reporting
- ✓ Low enough frequency to allow longer-running tasks
Frequently Asked Questions
How is */30 different from 0,30?
They are identical. */30 divides 60 minutes by 30 and runs at minute 0 and 30. 0,30 explicitly lists the same two minutes.
How many times per day does every 30 minutes run?
Every 30 minutes runs 48 times per day (twice per hour times 24 hours).