Launch Workspace
Standard Cron · 5 fields · Twice Daily

Cron Every 12 Hours — 0 */12 * * *

Twice-daily schedule. Fires at minute 0 of every 12th hour: 00:00 (12:00 AM) and 12:00 (12:00 PM).

Dialect:
5 fields
Plain EnglishHourly Interval

“Every 12 hours, on the hour”

Runs every 12 hours, on the hour. Evaluated according to STANDARD cron specifications.

Popular Presets:

How 0 */12 * * * Works

In standard five-field POSIX Cron, 0 */12 * * * breaks down as follows:

  • Minute (0): Exactly at minute 0 (on the hour).
  • Hour (*/12): Starting from hour 0, every 12 hours (matching hours 0 and 12 in 24-hour time).
  • Day of Month (*): Every day of the month.
  • Month (*): Every month of the year.
  • Day of Week (*): Every day of the week (Sunday through Saturday).

Because the minute field is set to 0, the job executes exactly twice per 24-hour day: at 00:00 (12:00 AM midnight) and 12:00 (12:00 PM noon).

How to Run Every 12 Hours Starting at a Specific Time

Standard step syntax */12 always anchors at hour 0. If you need a 12-hour cadence that starts at a specific hour to avoid peak traffic or align with business shifts, specify the exact hour pair in the hour field:

Start at 6:00 AM0 6,18 * * *Runs at 6:00 AM and 6:00 PM
Start at 1:00 AM0 1,13 * * *Runs at 1:00 AM and 1:00 PM
Start at 9:00 AM0 9,21 * * *Runs at 9:00 AM and 9:00 PM
Start at 3:00 AM0 3,15 * * *Runs at 3:00 AM and 3:00 PM

Platform Examples for 0 */12 * * *

Ready-to-use snippets for all major platforms and schedulers.

Linux / Crontab5-field POSIX cron
# /etc/cron.d/my-schedule
MAILTO="admin@example.com"
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# Runs every 12 hours at minute 0 (00:00 and 12:00)
0 */12 * * * www-data /usr/local/bin/my-script.sh >> /var/log/my-script.log 2>&1
Kubernetesbatch/v1 CronJob manifest
apiVersion: batch/v1
kind: CronJob
metadata:
  name: my-scheduled-job
  labels:
    app: my-scheduled-job
spec:
  schedule: "0 */12 * * *"
  timeZone: "UTC"          # requires Kubernetes v1.27+
  concurrencyPolicy: Forbid
  successfulJobsHistoryLimit: 3
  failedJobsHistoryLimit: 1
  jobTemplate:
    spec:
      template:
        spec:
          containers:
          - name: job
            image: alpine:latest
            command:
            - /bin/sh
            - -c
            - echo "Job executed at $(date)"
          restartPolicy: OnFailure
GitHub Actionsworkflow schedule trigger (UTC only)
name: Scheduled Workflow

on:
  schedule:
    # Runs every 12 hours at minute 0 (00:00 and 12:00) — evaluated strictly in UTC
    - cron: "0 */12 * * *"
  workflow_dispatch: # allow manual trigger

jobs:
  run-job:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Run task
        run: echo "Workflow triggered at $(date)"
Spring Boot@Scheduled — 6-field cron with seconds
@Component
public class ScheduledTask {

    private static final Logger log = LoggerFactory.getLogger(ScheduledTask.class);

    // Runs every 12 hours at minute 0 (00:00 and 12:00)
    // Spring uses 6-field cron: sec min hr dom mon dow
    @Scheduled(cron = "0 0 */12 * * *", zone = "UTC")
    public void runTask() {
        log.info("Scheduled job started at: {}", LocalDateTime.now());
        // your business logic here
    }
}
AWS EventBridge6-field cron with year field
# AWS EventBridge Rule (CloudFormation)
Resources:
  ScheduledRule:
    Type: AWS::Events::Rule
    Properties:
      Name: my-scheduled-rule
      ScheduleExpression: "cron(0 0,12 * * ? *)"
      State: ENABLED
      Targets:
        - Arn: !GetAtt MyLambdaFunction.Arn
          Id: LambdaTarget

Common Variations

Related expressions for similar scheduling needs.

ExpressionDescription
0 */12 * * *Every 12 hours (at 00:00 and 12:00) — step syntax
0 0,12 * * *Every 12 hours (at midnight & noon) — explicit list
0 6,18 * * *Twice daily at 6:00 AM and 6:00 PM (12-hour offset)
0 1,13 * * *Twice daily at 1:00 AM and 1:00 PM (12-hour offset)
0 9,21 * * *Twice daily at 9:00 AM and 9:00 PM (12-hour offset)
0 */6 * * *Every 6 hours (4 times daily: 00:00, 06:00, 12:00, 18:00)
0 0 * * *Once daily at midnight (12:00 AM)
0 12 * * *Once daily at noon (12:00 PM)

Frequently Asked Questions

Everything you need to know about Cron expressions, syntax rules, and platform nuances.

What is the Cron expression for every 12 hours?

The standard Cron expression for every 12 hours is "0 */12 * * *". It triggers twice per day at minute 0: at 12:00 AM (midnight / 00:00) and 12:00 PM (noon / 12:00).

How do I run a Cron job every 12 hours starting at a specific time (e.g. 6 AM or 1 AM)?

In standard Cron, the step syntax */12 always evaluates from 0 (00:00 and 12:00). To start at a specific offset hour, use an explicit comma-separated list of hours. For example, to start at 6:00 AM and run every 12 hours (6:00 AM and 6:00 PM), use "0 6,18 * * *". To start at 1:00 AM (1:00 AM and 1:00 PM), use "0 1,13 * * *".

Is "0 */12 * * *" the same as "0 0,12 * * *"?

Yes. In standard Unix/Linux Cron, "0 */12 * * *" and "0 0,12 * * *" are functionally identical. The step expression */12 starts at 0 and increments by 12, resulting in hour values 0 and 12.

How do I schedule an every 12-hour task in Spring Boot?

Use the 6-field Spring annotation: @Scheduled(cron = "0 0 */12 * * *", zone = "UTC"). The leading 0 specifies second 00.

How do I configure AWS EventBridge for every 12 hours?

In AWS EventBridge, use rate expression rate(12 hours) or six-field cron: cron(0 0,12 * * ? *). Note that EventBridge requires ? in the day-of-week field and an explicit year field.

What are typical production use cases for an every 12-hour schedule?

Every 12-hour schedules are ideal for twice-daily database snapshots, SSL/TLS certificate renewal checks (Certbot), external currency exchange rate synchronization, inventory reconciliation, and morning/evening digest emails.