Autoretto.
← All posts
How it works · August 6, 2026 · 4 min read · Autoretto Daily

Why our scheduler looks backward instead of forward

You might think a scheduler works by pointing at a clock and waiting for a specific minute. That is not how Autoretto does it anymore. We changed the logic a few weeks ago, and the result is a system that recovers from downtime better. The key idea is simple: instead of looking for the next future time to upload, the scheduler looks for the most recent past slot that has not been filled. That little reversal makes everything more reliable.

Let me explain the catch-up window. Every channel has a schedule, for example one video every three hours. The scheduler looks back over a set window, maybe the last two days, and finds the newest time that fits the schedule and has no video yet. If that time is in the past and still inside the window, the slot is considered due. That slot becomes the target for the next upload. It does not matter what the real clock says right now. The only thing that matters is whether a slot in the window is still empty.

Why does this matter? Imagine your computer is off for six hours. When it turns back on, the scheduler does not try to publish the video that was supposed to go out two hours from now. It publishes the one that should have gone out two hours ago. The schedule stays correct relative to the slot pattern. The channel does not drift forward just because the machine was sleeping. If you have a daily slot at noon, and your machine was off at noon, the next run at 1 pm fills that noon slot. The daily rhythm stays intact.

The actual trigger comes from an hourly cron job. A cron job is just a small task that runs on a fixed interval. On Autoretto, this job runs every hour, with or without anyone logged in. No browser needs to be open. The job checks whether any slot inside the catch-up window is due. If it finds one, it starts the render and upload pipeline. If not, it waits for the next hour. This is completely hands-off. You can close your laptop, travel, or forget about it entirely.

That means the system can sit untouched for days and still keep a channel running. The cron job wakes up, sees a due slot, and pushes the video. It is a quiet background process. You do not need to check anything. The only time you see it is when you open your own YouTube Studio and notice that a video went live at exactly the right slot. And if two slots are due? The cron job processes them one at a time, in order. It never jumps ahead to a future slot.

Now, there is a tricky part. What if two cron runs happen at the same time? Or what if a manual trigger overlaps with an automatic one? A naive scheduler could publish the same slot twice. That is why we added the last-release stamp. It is a small piece of data that records when the most recent release happened. Before any upload, the system checks that stamp. If the stamp is already newer than the slot we are about to fill, the run stops. Only one run gets to publish that slot.

The stamp also helps with interrupted runs. Suppose the upload fails halfway. The stamp was not set yet, so the next cron run will see the slot as due and try again. But if the upload succeeded and the stamp was set, the next run will skip it. This makes the system resilient without being greedy. It never publishes two videos for one slot, and it never forgets a slot completely. You can even trigger a manual publish right after an automatic one and nothing bad will happen. The stamp is checked before any render starts, not after.

The result is a schedule that feels alive even when nothing is actively watching. The scheduler is not predicting the future. It is reacting to the past. And that is a much safer way to run an autonomous channel. If you set a schedule, Autoretto will fill every slot in order, even if your laptop took a long nap. That is the quiet difference between a fragile timer and a real catch-up engine.