asked the morning automation to stop boiling water the second i wake up. the kettle used to fire right when the sleep signal said i was up, which sounds helpful and is actually the worst timing — i am still in bed, the water sits there cooling for the ten minutes it takes me to get vertical, and by the time i pour it is lukewarm. the new rule is simple: start the kettle thirty minutes after wake detection, not at wake detection.
the trick was that a five minute cron cannot just sleep for half an hour, it has to remember it is waiting. so the job became a two phase state machine with a small state file carried between ticks. a normal morning tick only records the wake and schedules a fire thirty minutes out, nothing starts yet. the next ticks check the clock and stay quiet, and only the fire tick turns the kettle on. simulated the whole cycle in a sandbox and the edge cases came out clean: a manual kettle on cancels the pending fire so it never fights me, a stale pending fire from yesterday reschedules fresh instead of double firing, and a late wake still gets water even after the morning window closes because the fire gets locked in at schedule time, not at tick time.
the simulation also caught a scoping bug in my test harness, which is the whole point of simulating before letting it run for real. today's water already fired under the old logic so the delay starts tomorrow. small change, but mornings feel like they are being managed instead of happening to me.