ShareYourGroupShareYourGroupCron Helper

Cron expression for every 12 hours

Every 12 hours, on the hour, every day.

Five fields for Linux, GitHub Actions and Kubernetes (minute hour day month weekday). Six or seven for Quartz. Nothing you type leaves your device.

What it means and when to use it

Twice a day is a natural rhythm for backups, for rotating logs and for a "morning and evening" report. */12 in the hours field takes hours 0 and 12, so the job runs at 00:00 and 12:00 server time. Writing 0 0,12 * * * gives the same result and is easier for a beginner to read.

Watch out for this

Midnight and noon are exactly the moments many other jobs choose, and the clock change on daylight-saving day can also shift what "midnight" means in a local zone. If you can, choose off-peak minutes such as 20 0,12 * * *. If you need two specific times that are not 12 hours apart, such as 08:30 and 20:15, they cannot be written in one line with a step: use two lines, one for each time.

What each field says

FieldWrittenMeans
Minute00
Hour*/120, 12
Day of month*every day of the month
Month*every month
Day of week*every day of the week

An example of the next runs

If it were Friday 13 November 2026 at 10:20 UTC, the next six runs would be these. Times are shown in UTC and in India time (UTC+5:30).

UTCIndia time
Fri 13 Nov, 12:00Fri 13 Nov, 17:30
Sat 14 Nov, 00:00Sat 14 Nov, 05:30
Sat 14 Nov, 12:00Sat 14 Nov, 17:30
Sun 15 Nov, 00:00Sun 15 Nov, 05:30
Sun 15 Nov, 12:00Sun 15 Nov, 17:30
Mon 16 Nov, 00:00Mon 16 Nov, 05:30

The same schedule in other places

Quartz

Quartz has a seconds field in front, uses ? in one day field, and counts Sunday as 1:

0 0 */12 * * ?

GitHub Actions

Scheduled workflows run in UTC unless you add a time zone. In the workflow file:

on:
  schedule:
    - cron: '0 */12 * * *'

Kubernetes CronJob

In a CronJob manifest the schedule goes in spec.schedule. Without spec.timeZone, it is read in the time zone of the cluster's controller:

spec:
  schedule: "0 */12 * * *"
  timeZone: "Etc/UTC"

A crontab line to copy

The command is made up. Replace it with your own and use full paths:

0 0,12 * * * /home/me/bin/backup.sh >> /home/me/backup.log 2>&1

Questions

Is @daily the same as running every 12 hours?

No. @daily is once a day at midnight. Use two hours in the hour field for twice a day.

This is an independent guide and tool. It is not connected with crontab.guru, Quartz, GitHub, Kubernetes, Spring or the Linux projects named here. Product names belong to their owners.