Regex and cron

Cron Expression for Twice a Day

At midnight and noon (00:00 and 12:00) every day. Copy it, check the next runs in your time zone and grab a snippet for your platform.

  • Free foreverNo trial, no paywall, no usage limits.
  • No sign-upOpen the page and start. We never ask for an email to use a tool.
  • PrivateEverything runs in your browser. Your input is never uploaded or stored on our servers.
  • Works offlineOnce the page has loaded, the tool keeps working without a connection.

Cron expression

0 0,12 * * *
Customize
0minuteMinute: at minute 0 (on the hour)0,12hourHour: at 00:00 and 12:00 (midnight and noon)*day (month)Day of month: every day of the month*monthMonth: every month*day (week)Day of week: every day of the week

At midnight and noon (00:00 and 12:00) every day.

Time zone
Run times, the week view and the snippets use this zone. It starts as your device's zone.
Show times as 9:00 AM instead of 09:00.

Next runs

Each run in your selected time zone, with the same moment in UTC. Daylight saving changes follow cronie, the cron on most Linux servers.
Copy run times (ISO 8601)

Next 7 days

Each square is one hour of local time in your selected zone. Darker squares have more runs. Daylight saving changes are not drawn.

Use it on your platform

Copy-ready config for each scheduler. Dialects differ: some only run in UTC, some can't do seconds, Cloudflare and AWS number weekdays from 1 = Sunday. The snippet handles the conversion and says what changed.
A line for crontab -e on Linux or macOS (Vixie cron, cronie).on.schedule for a workflow, with the timezone field GitHub added in March 2026 (UTC when omitted).A CronJob manifest with the timeZone field (Kubernetes 1.27+).Cron Triggers in wrangler.toml for a Worker. Runs in UTC and numbers weekdays from 1 = Sunday.crons in vercel.json plus the route it calls. Runs in UTC.EventBridge Scheduler (any time zone, recommended by AWS) and a legacy EventBridge scheduled rule (UTC).A .timer unit with OnCalendar=, the systemd replacement for cron.
Runs as writtenRuns in your time zone
crontab -e
Copy crontab -eDownload my-job.crontab
# ┌───────────── minute (0–59)
# │ ┌─────────── hour (0–23)
# │ │ ┌───────── day of month (1–31)
# │ │ │ ┌─────── month (1–12)
# │ │ │ │ ┌───── day of week (0–6, Sunday = 0)
# │ │ │ │ │
# * * * * *  command
CRON_TZ=UTC
0 0,12 * * *  /path/to/my-job.sh >> /var/log/my-job.log 2>&1
  • CRON_TZ=UTC is honored by cronie (Fedora, RHEL, Arch). Other cron daemons ignore it and use the server's time zone, so check timedatectl first.
  • Edit with crontab -e. Cron starts the next run even if the last one is still going; wrap the command in flock -n /tmp/my-job.lock to prevent overlaps.

Need scheduled jobs, queues and monitoring that never miss a run? Talk to our team

Quick answer

The cron expression for twice a day is 0 0,12 * * *, which runs at midnight and noon. The comma makes a list, so the hour field matches exactly 0 and 12, while the 0 in the minute field runs the job on the hour. Change the list to any two hours you like: 0 9,21 * * * runs at 09:00 and 21:00.

  • Live next runs
  • Any time zone
  • Field-by-field breakdown
  • Seven platform snippets
  • Daylight saving aware

How to use this schedule

  1. 1Copy 0 0,12 * * * with the Copy expression button.
  2. 2Check Next runs in your time zone to confirm it fires when you expect, including around daylight saving changes.
  3. 3Pick your platform under Use it on your platform and copy the ready-made crontab line, workflow, manifest or timer.
  4. 4Need a different time or day? Click Customize to open it in the cron expression generator and change any field.

How do I pick the two times?

The comma in 0,12 builds a list: the hour field matches each listed value and nothing else. Swap in any two hours from 0 to 23. They don't have to be twelve hours apart:

ExpressionRuns at
0 0,12 * * *00:00 and 12:00
0 9,21 * * *09:00 and 21:00
30 6,18 * * *06:30 and 18:30
0 8,17 * * 1-508:00 and 17:00, weekdays only

There is one catch: an expression has a single minute field, and it applies to both hours. 30 9,17 * * * means 09:30 and 17:30. If the two runs need different minutes, say 09:00 and 17:30, write two lines with the same command:

0 9 * * * /path/to/job
30 17 * * * /path/to/job

Twice a day or every 12 hours?

For midnight and noon, 0 0,12 * * * and 0 */12 * * * are the same schedule. Choose the form that says what you mean. The list reads as "at these two times" and is easy to edit into uneven pairs; the step reads as "every twelve hours" and is the natural fit when equal spacing matters. The every 12 hours page covers the step form in depth.

Uneven pairs change what each run should do. With 08:00 and 17:00, the gaps are 9 hours and 15 hours, so a job that processes a fixed "last 12 hours" window will double-count during the day and miss data overnight. Track the timestamp of the last successful run and process everything since then.

Twice daily suits start-of-day and end-of-day work: a morning summary and an evening reconciliation, syncing a partner feed before and after business hours, or backing up a busy database at quiet times. If once is enough, see every day at midnight or every day at noon.

What does each field in 0 0,12 * * * mean?

FieldValueAllowedMeaning
Minute00–59at minute 0 (on the hour)
Hour0,120–23at 00:00 and 12:00 (midnight and noon)
Day of month*1–31every day of the month
Month*1–12, JAN–DECevery month
Day of week*0–7 (0 and 7 are Sunday), SUN–SATevery day of the week

Read together: At midnight and noon (00:00 and 12:00) every day.

How do I adjust 0 0,12 * * * to my own schedule?

Small edits to 0 0,12 * * * cover most real-world needs:

ExpressionWhat it does
0 9,21 * * *Twice a day at 09:00 and 21:00
30 6,18 * * *Twice a day at 06:30 and 18:30
0 8,17 * * 1-5At the start and end of the working day, Monday to Friday
0 */12 * * *Every 12 hours, the step version of midnight and noon
0 0,8,16 * * *Three times a day, every 8 hours

Need something else? Click Customize at the top of the page to open this schedule in the cron expression generator and change any field.

Related schedules: Every 12 hours · Every day at midnight · Every day at noon · Every 6 hours

Browse all schedules in the cron schedule library.

How do I run 0 0,12 * * * in crontab, GitHub Actions, Kubernetes and the cloud?

PlatformWrite it asTime zone
Linux crontab0 0,12 * * *Server's time zone; CRON_TZ= in cronie
GitHub Actions- cron: "0 0,12 * * *"UTC by default; add timezone: (IANA name)
Kubernetes CronJobschedule: "0 0,12 * * *"Set timeZone: (1.27+)
Cloudflare Workers0 0,12 * * *UTC only; numbers weekdays from 1 = Sunday, so use names
Vercel Cron Jobs0 0,12 * * *UTC only; more than once a day needs Pro (Hobby: once a day)
AWS EventBridge Schedulercron(0 0,12 * * ? *)Takes a time zone; legacy scheduled rules are UTC only
systemd timerOnCalendar=*-*-* 00,12:00:00Add a zone after the time, e.g. Europe/London

In a crontab (crontab -e), the full line looks like this:

0 0,12 * * *  /path/to/job.sh >> /var/log/job.log 2>&1

The live panel at the top of the page builds complete, copy-ready files for each platform (workflow, CronJob manifest, wrangler.toml, vercel.json, AWS CLI and systemd units) and can shift the schedule to UTC for platforms that need it.

What can go wrong with 0 0,12 * * *?

  • The minute field is shared by both hours. 30 9,17 * * * runs at 09:30 and 17:30; for 09:00 and 17:30 you need two separate lines.
  • Writing 0,12 * * * * puts the list in the minute field: that runs at :00 and :12 of every hour, 48 times a day.
  • With uneven times such as 08:00 and 17:00 the gaps are 9 and 15 hours. A job that processes a fixed 12-hour window will double-count or miss data, so track the last successful run instead.
  • Midnight and noon in UTC are 20:00 and 08:00 in New York during daylight time. Decide whose midnight you mean before choosing UTC or local time.
  • On UTC-only platforms (Cloudflare Workers, Vercel, legacy EventBridge rules), the local time this runs at moves by an hour when daylight saving time starts or ends. Use GitHub's timezone:, Kubernetes timeZone, EventBridge Scheduler or cronie's CRON_TZ to pin it to local time.

Frequently asked questions

Use two lines, because one expression has a single minute field. For example 0 9 * * * on one line and 30 17 * * * on another run the same command at 09:00 and 17:30.
Yes, both run at 00:00 and 12:00. The list form is easier to change to two uneven times, such as 0 8,17 * * *.
Add a day-of-week range: 0 8,17 * * 1-5 runs at 08:00 and 17:00 from Monday to Friday.
It runs at minute 0 and minute 12 of every hour, because the list is in the minute field. Twice a day needs the list in the hour field: 0 0,12 * * *.

Last updated by the Playxoft engineering team.

From the engineers who built this tool

Need scheduled jobs that never miss a run?

Cron is the easy part. Retries, overlapping runs, time zones, queues and alerts when a job silently stops are where schedules break. We build background job systems you can trust, and we will review your setup for free.

More free tools

See all tools

Regex Tester

Test regex live with highlighted matches, plain-English explanations and code export.

Open tool

Cron Expression Generator

New

Build and explain cron schedules, see the next runs in any time zone, copy platform snippets.

Open tool

SQL Formatter

Beautify or minify SQL in 12 dialects, with keyword case, indent and line:column errors.

Open tool

cURL to Python Converter

New

Convert cURL commands into Python requests or httpx code with params, json, files and auth.

Open tool

cURL to Fetch Converter

New

Turn any cURL command into JavaScript fetch() code with headers, JSON, forms and auth.

Open tool

cURL to Axios Converter

New

Convert cURL commands into an Axios request config with params, data, auth and timeouts.

Open tool