Cron expression for every 40 minutes

ExamplesPlanner

No single cron expression runs exactly every 40 minutes: */40 * * * * fires at :00 and :40, then restarts on the hour. See the real run times, and the few crontab lines that make the spacing exact.

Paste an expression or choose a starting schedule below.

Select a field to edit it.

Start with:
Add to planner

*/40 isn't really every 40 minutes

The minute field restarts every hour, so after :40 the next run is :00 — a 20-minute gap, not 40. Even alternatives: */2, */3, */4, */5, */6, */10, */12, */15, */20, */30.

Schedule summary

At 0 and 40 minutes past the hour, every hour, every day
Build a schedule

Starts at minute 0 and repeats within each hour.

Run on these days

Valid changes update the expression above immediately.

Upcoming runs

The next 50 runs, shown in the schedule timezone and your local time.

Calculating…

About */40 * * * *

*/40 * * * * is the closest single line, but it isn't every 40 minutes. The minute field restarts every hour, so this fires at :00 and :40 and then at :00 again — a 20-minute gap. Because 40 divides a whole day (1440 minutes), 2 lines together give an exact 40-minute rhythm, including across midnight — see the exact crontab below.

Cron reads the five fields as minute hour day month weekday. For this schedule that breaks down as:

FieldPositionMatches
*/40minute0, 40
*hourevery hour
*day of monthevery day
*monthevery month
*day of weekevery day of the week

New to cron? Read the syntax reference or the FAQ.

Use it in crontab or GitHub Actions

The single line below is the closest cron gets, not the exact schedule (see above). The crontab timezone setting requires a compatible daemon such as Cronie. GitHub Actions defaults to UTC and accepts a timezone on each schedule. For other timezones, Kubernetes, EventBridge Scheduler, or Vercel, use the export menu in the calculator above.

crontab

# At 0 and 40 minutes past the hour, every hour, every day
# CRON_TZ requires a cron implementation that supports it, such as Cronie.
CRON_TZ=UTC
*/40 * * * * /path/to/command

GitHub Actions workflow

# At 0 and 40 minutes past the hour, every hour, every day
on:
  schedule:
    - cron: '*/40 * * * *'
      timezone: "UTC"

Exact version for crontab

0,40 */2 * * * /path/to/command
20 1-23/2 * * * /path/to/command

GitHub Actions accepts separate - cron: entries when the expressions use five fields and runs are at least five minutes apart. Commands and date checks belong in the workflow's job steps.

Repeating intervals

Build a custom cron expression →