⏰

Cron Every 12 Hours

Cron for cron every 12 hours

0
minute
0-59
*/12
hour
0-23
*
day of month
1-31
*
month
1-12 or jan-dec
*
day of week
0-6 or sun-sat
In plain English

At 00:00 and 12:00

Next runs (UTC)

  • Mon, Aug 31, 2026, 12:00 AM
  • Mon, Aug 31, 2026, 12:00 PM
  • Tue, Sep 1, 2026, 12:00 AM
  • Tue, Sep 1, 2026, 12:00 PM
  • Wed, Sep 2, 2026, 12:00 AM
  • Wed, Sep 2, 2026, 12:00 PM

Shown in your local time zone. Most schedulers — Vercel Cron, GitHub Actions and Kubernetes among them — evaluate cron in UTC, so convert before you ship.

Common schedules

0 */12 * * *

At 00:00 and 12:00

Field by Field

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

Midnight and Noon

0 */12 * * * fires at 00:00 and 12:00. It is equivalent to 0 0,12 * * *, which states the intent more plainly and is easier to change later.

Choose the Hours Deliberately

Midnight and noon are the default rather than the best choice. Midnight is the busiest hour on almost every shared system — every daily job in every time zone converges on it — and noon collides with peak traffic for consumer products.

0 3,15 * * * gives the same twice-daily rhythm in two much quieter hours.

Twelve Hours Is a Long Time to Be Wrong

At this spacing a silent failure can go unnoticed for most of a day. Emit a heartbeat on success and alert on its absence, rather than alerting on failure — a job that never starts produces no failure to alert on.

Time Zones

Standard crontab evaluates in system local time. Vercel Cron, GitHub Actions, Kubernetes CronJobs and AWS EventBridge all evaluate in UTC. If converting your local time crosses midnight, the day-of-week field shifts too — weekdays at 5pm in UTC-07:00 is 0 0 * * 2-6, not 0 0 * * 1-5.

The Day-Field Trap

When both the day-of-month and day-of-week fields are restricted, cron matches either, not both. 0 0 13 * 5 runs on every 13th *and* every Friday — not Friday the 13th. Leave one of them as * unless you genuinely want the union.

Other Common Schedules

ExpressionRuns
* * * * *Every minute
*/5 * * * *Every 5 minutes
*/15 * * * *Every 15 minutes
0 * * * *Every hour, on the hour
0 0 * * *Every day at midnight
0 9 * * *Every day at 9am
0 9 * * 1-5Weekdays at 9am
0 9 * * 1Every Monday at 9am

Making the Job Safe

  • Assume double firing. DST transitions, restarts and retries all cause it. Make the job
idempotent rather than assuming exactly-once.
  • Assume overlap. Cron starts the next run whether or not the last one finished. Take a
lock.
  • Avoid :00. Every hourly job on the internet fires at the top of the hour; a random
minute spreads load on shared APIs.
  • Log the start and end. A cron job that silently stops running is invisible until
someone notices the missing output.

Deploying This Schedule

``bash # crontab -e (system local time) 0 */12 * * * /usr/local/bin/job.sh >> /var/log/job.log 2>&1 `

`json // vercel.json (UTC) { "crons": [{ "path": "/api/job", "schedule": "0 */12 * * *" }] } `

`yaml # .github/workflows/job.yml (UTC) on: schedule: - cron: '0 */12 * * *' `

Starting from midnight UTC on 1 January 2026, this fires at:

Next runs
2026-01-01 12:00 UTC
2026-01-02 00:00 UTC
2026-01-02 12:00 UTC
2026-01-03 00:00 UTC
At 00:00 and 12:00.

Making It Survive Production

  • Redirect output. A cron job with no redirect emails its output to the crontab owner,
and on most servers that mail goes nowhere. Log to a file instead.
  • Use absolute paths. Cron runs with a minimal environment — no PATH you recognise,
no shell profile, no nvm. A script that works in your terminal frequently fails here for exactly that reason.
  • Escape percent signs. In a crontab, % means newline. date +\%Y needs the
backslash or the command truncates at the percent.
  • Take a lock. Cron starts the next run whether or not the last finished. flock` is
one line and prevents the overlap.
  • Alert on absence. A job that stops running is silent. Ping a dead-man's-switch service
on success so the *lack* of a ping is what pages you.

Frequently Asked Questions

What does `0 */12 * * *` mean?

At 00:00 and 12:00. Reading the fields in order: minute, hour, day of month, month, day of week.

What time zone will this run in?

System local time under standard crontab, but UTC on Vercel, GitHub Actions, Kubernetes and AWS EventBridge. Convert before deploying — and remember that a conversion crossing midnight also shifts the day fields.

How do I test a cron expression without waiting?

Preview the next run times, as the tool above does, and run the job manually first. Never validate a schedule by waiting for it to fire in production — you learn about the mistake a day late.

Related Tools

Explore other tools you might find useful:

More Cron Expression Generator & Descriptor tools

You might also need