Menu

What should a scheduled job do when the laptop was asleep?
📰

What should a scheduled job do when the laptop was asleep?

DEV Community: python·Hanako H.·1 day ago
#ezin1V3t
#devtopython#devto#dev#cron#firing
Reading 0:00
15s threshold

A cron expression says when a job runs and nothing else. On a server that is enough, because the machine is always on and a run rarely outlasts the gap to the next one. On a laptop neither is true. The lid is closed at 09:00, the app that owns the schedule isn't running, and an AI agent run can take several minutes. Two questions then need answers that 0 9 * * 1-5 can't give: what happens to a firing the machine slept through, and what happens when a firing comes due while the previous run is still going.

The osFoundry desktop app answers both for its scheduled agent loops, and its Rust source ( local_agent_tasks.rs ) names Temporal's Schedules as the model: an overlap policy (skip or queue) and a catch-up window (an hour, 12 hours, or however late).…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.