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
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).
Planning window (month)
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
Bottleneck engine
| Constraint | Base interval | After 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)
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.
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
Cron is not “every N minutes”
Compare month lengths
Retries cost quota
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
How to Calculate API Frequency for Monthly Quotas
Why Plan Around the Longest Month You Care About
Cron and Timers Without Breaking the Limit
Quick reference: common quotas on a 31-day basis
API Request Frequency Calculator FAQ
How many minutes between requests for 1,000 API calls per month?
Why should I base spacing on 31 days?
Can I use */45 in cron for every 45 minutes?
When does a simple */N * * * * cron line work?
How accurate is “requests used” for shorter months?
How often can I call the OpenWeatherMap free tier?
What is the difference between a calendar month and a rolling window API limit?
My cron */45 job isn’t firing every 45 minutes, why?
*/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?
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.