>_

Cron expression for every 30 minutes during work hours

To run a job every 30 minutes during work hours, use the cron expression below. It means: Every 30 minutes, between 09:00 and 18:59, Monday through Friday.

*/30 9-18 * * 1-5 Every 30 minutes, between 09:00 and 18:59, Monday through Friday

Field by field

Field Value Meaning
Minute */30 every 30
Hour 9-18 9 through 18
Day of month * any
Month * any
Day of week 1-5 1 through 5

Try it

minutehourday (month)monthday (week)

Presets

Next runs (your local time)

    Syntax on different platforms

    Linux crontab

    # crontab -e
    */30 9-18 * * 1-5 /path/to/script.sh >> /var/log/job.log 2>&1

    GitHub Actions

    on:
      schedule:
        - cron: '*/30 9-18 * * 1-5'  # UTC

    Kubernetes CronJob

    apiVersion: batch/v1
    kind: CronJob
    metadata:
      name: my-job
    spec:
      schedule: "*/30 9-18 * * 1-5"
      timeZone: "America/New_York"
      jobTemplate:
        spec:
          template:
            spec:
              containers:
                - name: job
                  image: busybox
                  command: ["date"]
              restartPolicy: OnFailure

    Spring @Scheduled

    // Spring has an extra seconds field first
    @Scheduled(cron = "0 */30 9-18 * * 1-5")
    public void run() { /* ... */ }

    Note: cron runs in the time zone of the machine or platform. Servers and GitHub Actions usually use UTC; Kubernetes lets you set timeZone.

    More examples

    Open the full Cron Expression Parser →