A social scheduler's hardest job isn't posting. It's never lying that it did.
Open any social media scheduler, queue a post, and most of the time it works. The hard part is the other times. The upload that half finished. The token that expired overnight. The platform that returned a 200 and then q
Open any social media scheduler, queue a post, and most of the time it works. The hard part is the other times. The upload that half finished. The token that expired overnight. The platform that returned a 200 and then quietly dropped the post. The scheduler shows a green check. Your post is nowhere. You find out when a follower asks why you went quiet for a week.
I'm building Octoque, a social media studio and scheduler, and this is the problem I keep circling back to. Sending a post to a platform is close to a solved problem. Knowing, honestly, whether it actually went live is not. Here is how I'm approaching it, and why "unknown" turned out to be the most important state in the whole system.
First, a smaller idea: golden hour
Octoque schedules a video or photo to each platform at its own golden hour, the window when that platform's audience is actually awake and scrolling, instead of firing the same post everywhere at the same minute. One caption, eleven destinations, each at its own best time. That part is a scheduling problem, and scheduling problems are tractable: you model the times, you queue the jobs, you fire them.
The interesting engineering is what happens at the moment a job fires.
One caption, eleven platforms, zero silent failures
Every platform has its own API, its own auth dance, its own set of ways to fail. The wrong move is to scatter that knowledge across the app. So in Octoque every outbound post goes through one provider layer. Nothing else in the codebase talks to a platform directly. The rest of the app hands the provider layer a job and gets back a status. That single boundary is where all the retry and idempotency logic lives, which means there is exactly one place to get it right.
The dangerous failure is never the clean one. A clean 429 or 500 is easy: wait, try again. The dangerous one is ambiguous. You call a platform's publish endpoint, the connection drops, and you never learn whether it succeeded. Retry blindly and you might double post. Give up and you might have thrown away a post that actually went live, or one that never did.
So every job carries an idempotency key. On an ambiguous result, the worker retries the same provider with the same key, so a success that already happened is recognized instead of duplicated. Only a confirmed, retryable failure is allowed to fall back to another route. An unknown result is never, ever treated as a failure.
result = provider.publish(job, idempotency_key=job.key)
match result:
case Confirmed(post_id):
mark_live(job, post_id)
case RetryableFailure(): # rate limit, 5xx: safe to try again
reschedule(job)
case Unknown(): # connection dropped mid call: ask again, never assume
retry_same_provider(job, job.key)
case PermanentFailure(reason):
mark_needs_you(job, customer_text(reason))
The whole flow, drawn out:
flowchart TD
A[Scheduled job fires] --> B[Provider layer: publish with idempotency key]
B --> C{Result?}
C -->|Confirmed| D[Mark Live, store post id]
C -->|Retryable failure| E[Reschedule and try again]
C -->|Unknown| F[Retry SAME provider, SAME key]
F --> C
C -->|Permanent failure| G[Mark Needs you, plain language reason]
The rule that falls out of this is small and strict: treat "unknown" as its own case, never as a quiet success and never as a quiet failure. Almost every silent-failure story I have heard from people who schedule posts for a living comes from a system that collapsed "unknown" into "done."
A status you can actually trust
A post in Octoque is only ever in a state we can defend: Draft, Needs approval, Scheduled, Posting, Live, or Needs you. There is deliberately no state that means "we think it worked." If the system cannot confirm a post went live, it does not show Live. That sounds obvious written down, and it is the single rule most schedulers quietly break the first time an edge case is inconvenient.
When something does go wrong, the person sees what happened and what to do next, in plain language, never a raw API error dumped on the screen. "Didn't post, your TikTok connection expired, reconnect to try again" is a sentence a human can act on. error: token_revoked (code 190) is not.
A few other decisions, quickly
A couple of smaller calls that came from the same instinct, do the honest thing even when it is more work:
- Uploads skip the app server. A big video should never crawl through your web server's request body. In Octoque the browser uploads straight to object storage with a signed URL, and the API confirms the file by its actual bytes before anything gets scheduled. The server that renders your pages is not the server that moves your gigabytes.
- API keys can't reach your account. Account-level actions, billing, keys, deleting your account, are only reachable with a real signed-in session, never with an API key. A leaked integration key can post on your behalf, but it can never empty your account.
Neither of these is glamorous. Both are the kind of thing you only notice when they are missing.
Building this mostly solo, in public
I'm building Octoque as a solo founder, with Claude Code as a pair programmer for the parts one person cannot hold in their head at once. It is getting close, not a victory lap, and writing these posts is partly how I force myself to defend each decision in public before shipping it.
If you are building anything that fires off actions you cannot take back, payments, emails, posts, the lesson that keeps proving itself is this: give "unknown" its own branch, and never let it decay into "success." People will forgive a post that goes out late. They will not forgive the one you swore went out and didn't.
Octoque is at octoque.com. I'll keep writing these as the build goes.
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.