# Cron (/academy/cron)



The kitchen does not wait for you to remember.

A **cron** is a printed hour on the wall plus a task. "2 a.m.: dump yesterday's leftovers." "Monday 9: send the digest." Nobody is in the room. The hour arrives. The [job](/academy/job) starts.

That is different from a [webhook](/academy/webhook). A webhook waits for the world to poke it — a payment, a signup, a GitHub push. Cron does not care what just happened. It cares what time it is.

**Clock work vs click work**

* A user hits "export" — that is now. Put it on a [queue](/academy/queue).
* Every night, wipe staging todos older than a day — that is a clock. Cron.
* "Remind them their Polar trial ends Friday" — clock, if you already know Friday.

Hosts rename it. Scheduled functions. "Hit this [endpoint](/academy/endpoint) every hour." Same wall. Same leftover.

The [CLI](/academy/cli) will not invent a schedule for you. After `npx create-hackhaton-space-stack@latest`, the app answers humans. Cron answers the calendar. You add it when the demo has a leftover that would otherwise live in your head: cleanup, a digest, the thing you always forget between Saturday night and Sunday judging.

**It is obedient, not wise**

The wall does not ask if the task still makes sense. If the cleanup broke at 2 a.m., it will cheerfully break again at 2 a.m. Have it write a [log](/academy/log) line, or scream when it fails. A backup that ran is fine. A backup that stays quiet on the night it didn't is how you lose the demo data.

**What this unlocks**

Once you can name the wall, "we'll just remember to run it" stops being a plan. You either put the leftover on a clock, or you admit a human is the schedule.

A [queue](/academy/queue) is a line for work that just happened. Cron is a line for work that is due. [Workers](/academy/worker) do both. You just have to know which ticket printer you are standing at.
