Cron Expression for Twice a Day

Twice a day — twice a day
0 0,12 * * *

Cron reads this as: minute 0, past hour 0 and 12.

Next 5 runs

Computed in your browser's local time zone. Cron itself evaluates against the server's zone, which on most cloud hosts is UTC — see time zones & DST if that distinction matters here.

When to use this schedule

A comma-separated list in the hour field gives you two fixed times — here midnight and noon. Unlike */12, a list lets you pick times that are not evenly spaced, which is usually what "twice a day" actually means in practice: 0 6,18 * * * for a morning and evening run, say.

What to watch out for

If the two runs do different work, do not try to make one expression serve both — write two crontab lines. A single job that branches on date +%H is harder to test, harder to run by hand, and impossible to reschedule independently. Two lines with two log files cost nothing and are far easier to reason about at 3 AM.

The crontab line

0 0,12 * * * /usr/local/bin/your-job.sh >> /var/log/your-job.log 2>&1

Redirect the output somewhere you will actually read it — by default cron mails it, and on a host with no mail transport that means it is discarded. See the crontab guide for the surrounding syntax.

Related schedules

Variations on twice a day
ExpressionSchedule
0 */12 * * *Same times, written as a step
0 6,18 * * *Morning and evening
0 9,17 * * 1-5Start and end of the workday

Build your own

Need something this page does not cover? Compose it field by field in the visual builder, or paste an expression you already have into the explainer for a per-field breakdown. The examples library collects sixty schedules in one place, and the guides cover crontab syntax, time zones, troubleshooting and production practices.