Cron twice a day: the expression, explained, in Node.js

The cron expression for “twice a day” is 0 0,12 * * *. This page shows what each field does, the next five times it will fire, the mistake most people make with it, and a working Node.js example you can paste.

The expression

0 0,12 * * *
FieldValueMeaning
minute0exactly 0
hour0,12at 0 and 12
day of month*every day of month
month*every month
day of week*every day of week

Next five runs (UTC, from now)

  1. 2026-09-18 00:00 UTC
  2. 2026-09-18 12:00 UTC
  3. 2026-09-19 00:00 UTC
  4. 2026-09-19 12:00 UTC
  5. 2026-09-20 00:00 UTC

Mistakes people make with this schedule

  • Using "0 */12 * * *" and expecting 08:00 and 20:00. Step values always count from 0, so it fires at 00:00 and 12:00. For any other pair, list the hours explicitly.
  • Assuming the server clock is your clock. Cron runs in the machine’s timezone unless the runtime says otherwise; the examples here are UTC.
  • No lock around a job that might overlap itself, and no alert when it silently stops. That second one is what Supercrontab is for.

Run it in your stack

import cron from 'node-cron';

cron.schedule('0 0,12 * * *', async () => {
  await runReport();
}, { timezone: 'UTC' });

In-process schedulers die with the process. Fine for one long-lived server, not for serverless.

Questions

Does 0 0,12 * * * run in my local time?

Only if the scheduler is configured for it. crontab uses the system timezone; Vercel and GitHub Actions always use UTC; Laravel and node-cron take a timezone option. In Supercrontab the timezone is a field on the job.

What if the previous run is still going?

Classic cron starts the next run anyway. Add a lock (flock on Linux, withoutOverlapping() in Laravel) or let Supercrontab skip the tick while the previous request is open.

Is there a shorter way to write this?

No. The five-field form is the shortest portable version.