Skip to content
Cron Expression Generator

Cron expression for every 3 hours

The cron expression to run a job every 3 hours is:

0 */3 * * *

At 0 minutes past the hour, every 3 hours.

Runs eight times a day at 00:00, 03:00, 06:00 … 21:00. Because 3 divides 24 evenly, the gap stays exactly three hours across midnight. Cron is aligned to the clock, not to the moment you saved the crontab, so there is no way to say "every 3 hours starting now"; shift the cycle with a ranged step instead, such as 0 1-23/3 * * * for 01:00, 04:00 … 22:00. Writing */180 in the minute field does not work either: the minute field only counts 0-59 and restarts every hour, so its step can never span more than one hour.

Test and customize this schedule

Format
Valid

5 fields (minute hour day month weekday), or 6 with seconds first. Names like MON-FRI, macros like @daily and full crontab lines work. Press / to focus.

English

At 0 minutes past the hour, every 3 hours.

العربية

عند الدقيقة 0 من كل ساعة، كل 3 ساعات.

    Quick presets

    Visual cron generator

    Pick options for each field — the expression above updates instantly.

    Next 5 executions

    Local time:

      Cheat sheet

      *
      Any value
      ,
      List — 1,15,30
      -
      Range — 1-5
      /
      Step — */10
      ?
      No specific value (day fields)
      @daily
      Macro for 0 0 * * *

      Field-by-field breakdown

      FieldValueMeaning
      Minute00
      Hour*/3Every 3 (0, 3, 6 … 21)
      Day of month*Every day of the month
      Month*Every month
      Day of week*Every day of the week

      Copy-paste examples

      Linux crontab

      # crontab -e
      0 */3 * * * /usr/local/bin/my-job.sh >> /var/log/my-job.log 2>&1

      Kubernetes CronJob

      apiVersion: batch/v1
      kind: CronJob
      metadata:
        name: my-job
      spec:
        schedule: "0 */3 * * *"
        concurrencyPolicy: Forbid
        jobTemplate:
          spec:
            template:
              spec:
                restartPolicy: OnFailure
                containers:
                  - name: my-job
                    image: busybox:1.36
                    command: ["sh", "-c", "date; echo Hello from cron"]

      GitHub Actions

      on:
        schedule:
          - cron: '0 */3 * * *'   # always UTC

      GitHub Actions evaluates schedules in UTC, does not accept macros such as @daily, and will not run workflows more often than every 5 minutes; runs can also be delayed during periods of high load.

      Common variations

      Click an expression to load it into the tool above.

      Cron expressionSchedule
      At 0 minutes past the hour, every 3 hours, between 1:00 AM and 11:59 PM.
      At 30 minutes past the hour, every 3 hours.
      At 0 minutes past the hour, every 3 hours, Monday through Friday.
      At 0 minutes past the hour, every 3 hours, between 9:00 AM and 6:59 PM.

      Frequently asked questions

      What does 0 */3 * * * mean in cron?

      At 0 minutes past the hour, every 3 hours. The five fields are minute 0, hour */3, day of month *, month * and day of week *.

      How do I run a cron job every 3 hours in Linux?

      Run crontab -e, add the line 0 */3 * * * /path/to/command, then save and exit. Use absolute paths, redirect output to a log file, and confirm it runs with grep CRON /var/log/syslog.

      When will 0 */3 * * * run next?

      It depends on the current time and the time zone of the machine running cron. The calculator on this page shows the next 5 run times in your local time zone; on a server, cron uses the system time zone, which is often UTC.

      Related cron schedules

      Browse all cron expression examples →