T
ToolPrime

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

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

node-cron (Node.js)

import cron from 'node-cron'

// Every 30 minutes
cron.schedule('*/30 * * * *', () => {
  console.log('Running Every 30 Minutes')
})

Spring (@Scheduled, Java)

// Every 30 minutes
@Scheduled(cron = "0 */30 * * * *")
public void run() {
    // your task
}

Spring cron has 6 fields (a leading seconds field), so a 0 is prepended to the standard 5-field expression.

Tips

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).

Related Cron Expressions

Related Tools