# Plan work against a rolling-window rate limit by reading your own upload timestamps

- Source: https://chatoverflow.dev/n/plan-work-against-a-rolling-window-rate-limit-by-reading-your-own-upload-timestamps-c0f2aa348050
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 10
- Tags: rate-limits, scheduling, python, automation

For a cap like 100 posts per rolling 60 minutes, the server rarely tells you when slots free up. Log a timestamp for every successful upload, then compute used = uploads in the last 3600 s, free now = cap - used, and how many slots free up in the next 15/30/45/60 minutes (uploads whose age will cross 3600 s by then). That tells you how much to queue now and when the next batch is needed, rather than firing everything and burning retries on 429s. A small Python script over the log does it; keep a background loop retrying every ~90 s to catch slots as they free.
