Start free · Free tools · Fair usage limits
Browse Tools

Categories

Custom AI Solutions – AI2Flows
LIVE NEWS
Loading latest AI & SEO news…
Home›Tools›Crontab Builder›How to run a cron job every 45 minutes
Cron expression

How to run a cron job every 45 minutes

How to schedule a cron job every 45 minutes: why one expression isn’t enough, a copy-ready crontab workaround, and next run times.

Quick answer

Standard cron cannot run a job every 45 minutes with one plain expression. */45 does not mean “every 45 minutes”. The usual fix is 4 crontab lines, shown below, which you can copy straight into crontab -e.

Last updated · Maintained by FreeAIToolz · How we test

Every 45 minutes

Open in the full Crontab Builder →

Copy-ready crontab to run a job every 45 minutes

0 */3 * * * /path/to/command
45 0-23/3 * * * /path/to/command
30 1-23/3 * * * /path/to/command
15 2-23/3 * * * /path/to/command

Four lines repeat a 3-hour pattern: :00, :45, then :30 and :15 of the following hours, giving exactly 45 minutes between runs.

What does */45 * * * * mean?

Every 45 minutes. This is the base schedule used by the workaround above.

FieldValueAllowedMeaning
Minute*/450–59every 45 minutes (0, 45)
Hour*0–23every hour
Day of month*1–31every day of month
Month*1–12every month
Day of week*0–6 (0 = Sunday)every day of week

Example run times

If the current time were Monday 4 January 2027, 08:58 UTC, */45 * * * * would next run at:

  1. Mon 4 Jan 2027, 09:00 UTC
  2. Mon 4 Jan 2027, 09:45 UTC
  3. Mon 4 Jan 2027, 10:00 UTC
  4. Mon 4 Jan 2027, 10:45 UTC
  5. Mon 4 Jan 2027, 11:00 UTC
  6. Mon 4 Jan 2027, 11:45 UTC

When to use a cron job every 45 minutes

Jobs where people expect a 45-minute gap.

Things to watch out for

*/45 does not mean “every 45 minutes”. Steps restart every hour, so */45 runs at :00 and :45, giving gaps of 45 and then 15 minutes. For a true 45-minute interval, list the times over a 3-hour cycle or use a timer.

How to use this schedule in your scheduler

This schedule needs 4 separate entries. Schedulers that accept a list (GitHub Actions) take them all; for Kubernetes or EventBridge, create one schedule per line.

Linux crontab

Run crontab -e and add:

0 */3 * * * /path/to/command
45 0-23/3 * * * /path/to/command
30 1-23/3 * * * /path/to/command
15 2-23/3 * * * /path/to/command

GitHub Actions

on:
  schedule:
    - cron: '0 */3 * * *'
    - cron: '45 0-23/3 * * *'
    - cron: '30 1-23/3 * * *'
    - cron: '15 2-23/3 * * *'   # UTC

GitHub Actions runs scheduled workflows at most once every 5 minutes, and runs can be delayed at busy times.

Kubernetes CronJob

apiVersion: batch/v1
kind: CronJob
metadata:
  name: my-job
spec:
  schedule: "*/45 * * * *"
  timeZone: "Etc/UTC"
  concurrencyPolicy: Forbid
  jobTemplate:
    spec:
      template:
        spec:
          restartPolicy: OnFailure
          containers:
            - name: job
              image: busybox
              command: ["sh", "-c", "echo run"]

AWS EventBridge Scheduler

EventBridge uses six fields (with a year) and needs ? in either day-of-month or day-of-week:

cron(0/45 * * * ? *)

Spring @Scheduled (seconds first)

@Scheduled(cron = "0 */45 * * * *", zone = "UTC")

Node.js (node-cron)

cron.schedule('*/45 * * * *', () => { /* job */ }, { timezone: 'UTC' });

Vercel Cron Jobs (vercel.json)

{ "crons": [{ "path": "/api/cron", "schedule": "*/45 * * * *" }] }

Vercel cron jobs run in UTC, and how often they can run depends on your plan.

More cron schedules

Frequently asked questions

Is there a single cron expression for every 45 minutes?
*/45 does not mean “every 45 minutes”. Steps restart every hour, so */45 runs at :00 and :45, giving gaps of 45 and then 15 minutes. For a true 45-minute interval, list the times over a 3-hour cycle or use a timer. Four lines repeat a 3-hour pattern: :00, :45, then :30 and :15 of the following hours, giving exactly 45 minutes between runs.
Which time zone does this cron schedule use?
Cron runs in the time zone of the system or service that executes it. Linux servers and cloud schedulers (GitHub Actions, Vercel, AWS EventBridge by default) normally use UTC. Many crontabs accept CRON_TZ=Area/City at the top, and Kubernetes CronJobs have a timeZone field.
How do I stop runs from overlapping?
If a run can take longer than the interval, wrap the command with flock so only one copy runs at a time, for example: */45 * * * * flock -n /tmp/job.lock /path/to/command. Kubernetes CronJobs use concurrencyPolicy: Forbid for the same effect.
How do I test this schedule before deploying?
Paste the expression into the live checker on this page to see the next 10 run times in UTC and your local time. On Linux, check the system log (grep CRON /var/log/syslog) after the first expected run.