Skip to main content

Cron spacing for monthly API quotas

API Rate Limit & Cron Frequency Calculator

Spread a fixed monthly API budget across days and minutes: safe spacing between calls, month-length comparison, and cron or systemd guidance so free-tier limits never surprise you.

By Jeff Beem

Technical spec

Rate limits

01

Primary quota

Optional burst cap

Many APIs enforce both a monthly quota and a short-term burst cap (e.g. 10 req/min). If both apply, the calculator uses whichever constraint produces the longer safe interval (the bottleneck).

02

Planning window (month)

Month window type
03

Safety margin

Increase this if your client auto-retries on failure, you run workers in multiple regions, or you cannot centrally coordinate concurrent callers. 5% is a safe default for single-region, single-process polling.

Output

Throttle & schedule

A

Bottleneck engine

ConstraintBase intervalAfter margin
1,000 per month (strictest) 44.64 min (2678 sec)46.87 min (2812 sec)

Safe interval (bottleneck)

46.87 min (2812 sec)

Limited by 1,000 per month after 5% margin.

The address bar updates as you edit, use share to copy the full link.

Monthly budget (1,000 / month cap)

Safe firings use floor(monthSeconds ÷ interval)

February (common)860 / 1,000 (140 left)
February (leap)890 / 1,000 (110 left)
30-day months921 / 1,000 (79 left)
31-day months952 / 1,000 (48 left)
B

Cron & systemd

Cron minute field

*/N * * * * only equals “every N minutes” when N is one of 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30 (divisors of 60). Otherwise use systemd or staggered lines (see 45‑minute template).

Suggested multi-line cron

# Illustrative only, cron cannot hit 2812.32s (~46.87 min) exactly; prefer the systemd timer below.
# Example: split across three offsets in the hour (adjust path and verify times):
0 * * * * /path/to/your/script.sh
20 * * * * /path/to/your/script.sh
40 * * * * /path/to/your/script.sh

systemd timer (accurate interval)

[Timer]
OnUnitActiveSec=2812.32s
AccuracySec=1s

No single crontab minute pattern matches this spacing exactly. Prefer the systemd timer below; the multi-line block is illustrative.

C

Code snippets

import time

INTERVAL_SEC = 2812.32

while True:
    # your_api_call()
    time.sleep(INTERVAL_SEC)

Common API Limits

Illustrative limits, confirm on each provider’s site. “Approx. spacing” opens this page with that quota pre-filled (shareable URL state).

API Quota Window Approx. spacing Docs
Abstract API 1,000 Monthly ~45 min Plans & limits
Discord API 10,000 Per minute ~6 ms Rate limits
GitHub API (authenticated) 5,000 Per hour ~0.8 s Rate limits
ipinfo.io 50,000 Monthly ~1 min Plans
NewsAPI 100 Daily ~14.4 min Pricing
OpenAI API (free) 60 Per minute ~1 s Rate limits
OpenWeatherMap 1,000 Monthly ~45 min Pricing
Reddit API 60 Per minute ~1 s API wiki
Shopify API (basic) 120 Per minute ~0.5 s Rate limits
Slack API (tier 3) 50 Per minute ~1.3 s Rate limits
Stripe API (live) 6,000 Per minute ~10 ms Rate limits
Twitter / X API (free) 50 Per minute ~1.3 s Rate limits

Monthly API quotas and steady polling

Free tiers often quote a maximum number of HTTP calls per month. If you poll on a timer, the safe period is driven by calendar length and integer rounding, not only “divide by 30.” Here is how to reason about spacing, cron, and drift.

Ideas worth keeping straight

Ceiling, not floor

Average spacing might be 44.6 minutes. Your scheduler usually needs an integer minute or second step. Rounding down makes you poll too often and risk blowing the quota.

Cron is not “every N minutes”

Minute fields reset each hour. Patterns like */45 do not mean one fire every 45 minutes across hour boundaries. Read the tool warning before you paste a line into crontab.

Compare month lengths

The bar comparison shows how many firings fit in 28-, 29-, 30-, and 31-day months at your chosen spacing. If you planned for February only, March might overshoot.

Retries cost quota

401/429 responses and client retries still hit the API. Leave slack under the cap if your client automatically retries.

API Rate Limit & Cron Frequency Calculator

Translate monthly API quotas into safe polling intervals. Plan cron and systemd timers without exceeding 1k, 5k, or 10k monthly calls.

What This Tool Does

You enter how many HTTP requests your plan allows per month and how many days you want to bake into spacing (default 31). The calculator outputs average minutes between calls, a rounded-up recommendation, and how many firings fit in 28-, 29-, 30-, and 31-day months at that spacing. It flags when naive cron syntax would overfire and suggests safer options.

How to Calculate API Frequency for Monthly Quotas

Let QQ be your monthly maximum and DD the number of days you treat as one billing month for planning. Total minutes in that window is M=D×24×60M = D \times 24 \times 60. Average minutes between requests is M/QM / Q. A practical scheduler uses a whole number of minutes, M/Q\lceil M / Q \rceil, so rounding never speeds you up into an overage.

Why Plan Around the Longest Month You Care About

Providers usually count calendar months. A schedule tuned only for February leaves extra slack in March, but a schedule tuned only for a 30-day month can overshoot when the month has 31 days. Choosing D=31D = 31 up front is an easy hedge unless you intentionally rotate keys or change cadence mid-year.

Cron and Timers Without Breaking the Limit

When your minute spacing divides 60 evenly, a cron line like /N        */N \; * \; * \; * \; * can express “every N minutes.” Otherwise use a systemd timer (for example OnUnitActiveSec=Nmin), Kubernetes interval schedules, CI cron with explicit RFC3339, or a short shell loop with sleep. For exactly 45-minute spacing, three staggered cron lines are the usual portable Unix pattern; the calculator surfaces them when relevant.

Quick reference: common quotas on a 31-day basis

Illustrative values using M=44,640M = 44{,}640 minutes: 1,000 calls needs at least 45 minutes between calls; 5,000 calls needs at least 9 minutes; 10,000 calls needs at least 5 minutes. Your provider’s exact window (rolling 30 days vs calendar month) may differ, so treat these as starting points.

API Request Frequency Calculator FAQ

How many minutes between requests for 1,000 API calls per month?

Plan using the longest month you care about. For 31 days there are 31×24×60=44,64031 \times 24 \times 60 = 44{,}640 minutes. Dividing by 1,000 gives about 44.64 minutes per request on average. Rounding up to 45 whole minutes keeps you under 1,000 calls in that month after rounding and small clock drift. The calculator does this ceiling step for any quota you enter.

Why should I base spacing on 31 days?

If you size your job for a 28- or 30-day month, a 31-day month has extra minutes and extra run opportunities. Fixed cron schedules often fire the same number of times per day, so you can creep over a strict monthly maximum. Using 31 days (or the calculator default) trades a slightly slower cadence for staying under the cap every month.

Can I use */45 in cron for every 45 minutes?

No. In standard cron, /45*/45 runs at minute 0 and 45 of every hour, which is about 48 times per day, not one call every 45 minutes. For a true 45-minute cadence you need multiple cron lines that stagger across hours, a systemd timer with OnUnitActiveSec=45min, Kubernetes CronJob with interval semantics, or a loop script with sleep. The tool shows a three-line cron template when your safe spacing lands on 45 minutes.

When does a simple */N * * * * cron line work?

When N minutes divides 60 evenly (for example 5, 10, 15, 20, 30), /N*/N fires exactly every N minutes within the hour and lines up across hours. For other intervals, use a scheduler that supports wall-clock intervals, not minute-star tricks alone.

How accurate is “requests used” for shorter months?

The table assumes one request exactly every N minutes for the whole month ( minutes in monthN\lfloor \frac{\text{minutes in month}}{N} \rfloor ). Manual retries, failures, or bursts still count against your provider. Treat the numbers as a schedule baseline, not a legal guarantee.

How often can I call the OpenWeatherMap free tier?

The common free tier is often around 1,000 calls per calendar month. Spread evenly across a long month with a little buffer, that implies on the order of one call every ~45 minutes, use the calculator for your exact quota. Open pre-filled for 1,000/month.

What is the difference between a calendar month and a rolling window API limit?

A calendar month resets on the 1st (or your provider’s billing anchor) and uses that month’s actual length (28–31 days). A rolling window looks back exactly a fixed duration (often 30 days from “now”), so the effective budget does not swell in 31‑day months. Stripe, OpenAI, and many SaaS APIs describe rolling limits in their docs.

My cron */45 job isn’t firing every 45 minutes, why?

In standard cron, */45 runs at minute 0 and 45 of each hour (~32 times/day), not one execution every 45 minutes wall-clock across hour boundaries. Use multiple staggered cron lines (this tool prints a template when relevant), or a systemd timer / sleep loop, see the amber “Cron minute field” note above the systemd block.

What happens if I have both a monthly limit and a per-minute burst cap?

Enter the monthly quota as your primary constraint, then use + Add burst limit for the short-term cap (e.g. requests per minute). The bottleneck table shows which rule produces the longest safe interval; that spacing keeps you within both limits when you throttle to the strictest constraint.

Mathematical Reference Note

Calculation Logic: This tool uses standard mathematical algorithms. While we strive for accuracy, errors in logic or user input can result in incorrect data.

Verification: Results should be cross-checked if used for important academic, professional, or personal calculations.

Standard Terms: This tool is provided free of charge and as-is. CalcRegistry provides no warranty regarding the accuracy or fitness of these results for your specific needs.

© 2026 CalcRegistry Reference Last System Check: May 2026Free Online Utility Tools