Follow-Up Timers for Property Leads: A Small Scheduler With Stop Rules A co-founder of NxFlowAI (Mumbai) outlined a small scheduler pattern for real-estate lead follow-up automation built around explicit stop rules, using a per-lead FollowUp data model, a three-step sequence, a should_stop function, and a periodic tick worker loop. The design halts automation and alerts a human agent whenever a lead replies, and recommends making advance and stop atomic with the send or using an outbox table to prevent duplicate nudges after a crash. Follow-up is where property leads are won, and where bots turn into spam. The difference is almost always the stop rules. This post shows a small scheduler pattern for AI automation for real estate agencies with follow-up timers that stop https://www.nxflowai.com/services : a data model, a sequence, the stop logic, and a worker loop. One row per lead in an active sequence. python from dataclasses import dataclass from datetime import datetime from typing import Optional @dataclass class FollowUp: lead id: str agent id: str step: int 0 = first reply already sent next at: datetime status: str "active" | "paused" | "stopped" stop reason: Optional str = None Keep it short and explicit. Each step says what kind of message it is, because that decides who sends it. SEQUENCE = {"after hours": 2, "kind": "agent draft"}, AI drafts, agent sends {"after hours": 48, "kind": "template nudge"}, pre-approved template {"after hours": 120, "kind": "related listing"}, pre-approved template php def should stop lead, last msg - Optional str : if last msg and last msg.from lead: return "replied" a human takes over, timers end if lead.status in "not interested", "bought elsewhere", "under offer" : return "closed" if lead.opted out: return "opt out" if lead.step = len SEQUENCE : return "sequence done" return None A reply from the lead always stops automation and alerts the agent. That single rule prevents most of the embarrassing cases, like a nudge arriving an hour after the buyer booked a viewing. python def tick now : for f in due followups now : lead = get lead f.lead id reason = should stop lead, last message f.lead id if reason: stop f, reason continue step = SEQUENCE f.step if step "kind" == "agent draft": queue for agent f, draft from history f.lead id else: send template f, step "kind" advance f step += 1, compute next at from the next step Run tick from a scheduler every few minutes. Make advance and stop atomic with the send, or use an outbox table, so a crash cannot send the same nudge twice. next at to sensible local hours for the lead, not the server. Disclosure: I co-founded NxFlowAI Mumbai . When we scope a follow-up workflow like this, the first audit takes 72 hours.