Candid Tools

Cron twice a day

Twice a day in cron is a list in the hour field, such as 0 9,21 * * * (Unix) or 0 0 9,21 * * ? (Quartz, Spring); next runs are calculated in your browser.

Unix cron (crontab, GitHub Actions, Kubernetes)
  • 0 9,21 * * *
Quartz and Spring (seconds first; valid in both)
  • 0 0 9,21 * * ?
AWS EventBridge (minute first, year last)
  • cron(0 9,21 * * ? *)

Read by our parser as: At 9:00 AM and 9:00 PM, every day. Open in the cron checker

Next 10 runs

Calculating in your browser...

  1. 1 
  2. 2 
  3. 3 

At a glance

Accepts
Nothing to enter - the schedule is preset on the page
Outputs
The expression in Unix, Quartz/Spring and AWS form, plus its next 10 run times
Where it runs
Entirely in your browser, on your device
What leaves your device
Nothing - what you type stays in this tab
Limits
Run times use your browser's timezone or UTC; real schedulers can start a run late
Account
Not required - there is no sign-up
Price
Free, with no watermark and no usage cap
Made by
Visrut

What it means

Put two hours in the hour field, separated by a comma: 0 9,21 * * * runs at 9:00 and 21:00 every day. The hours don't have to be 12 apart; 30 8,17 * * * runs at 8:30 and 17:30. Spring's docs show the same pattern as 0 0 6,19 * * * (6 AM and 7 PM).

When this is the right schedule

Use it when a job should catch both ends of the day: a morning and evening digest, start-of-day and end-of-day stock levels, twice-daily backups.

When to pick something else

Look elsewhere when you need different minutes for the two runs (9:00 and 21:30). A single cron line shares one minute field, so that takes two lines.

Things to watch

0 */12 * * * is also twice a day

It runs at 00:00 and 12:00 only, because the step starts at hour 0. Use the list form when you want to choose the hours.

Different minutes need two lines

0 9 * * * and 30 21 * * * as separate entries. In Kubernetes or GitHub Actions that means two schedules (GitHub allows several cron entries under schedule).

Hours are in the scheduler's timezone

9 and 21 in UTC are 9 and 21 in London in winter but 10 and 22 in summer (BST). If the times should follow local clocks, set the timezone on the schedule (GitHub timezone, Kubernetes .spec.timeZone, AWS Scheduler's schedule timezone).

Frequently asked questions

How do I run a cron job at 8 AM and 8 PM?

0 8,20 * * *. In Quartz or Spring: 0 0 8,20 * * ?.

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

Yes. Both run at 00:00 and 12:00.