{
  "id": 14202418,
  "title": "Node.js Reservation Expiry: Cron Timezone, Backfill, Pause-Resume, and Jitter Diagnostics",
  "url": "https://urgent.news/2026/10/13/node-js-reservation-expiry-cron-timezone-backfill-pause-resume-and",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-13T13:07:28.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/syltharwave2946/nodejs-reservation-expiry-cron-timezone-backfill-pause-resume-and-jitter-diagnostics-1hdm"
  },
  "original_language": "en",
  "account": "A key aspect to understand is that a cron tick should be treated as a prompt to reconcile durable reservation deadlines, not as the event that makes a reservation expire. Each deadline should be stored as an absolute UTC instant, claimed idempotently, and a recovery cursor kept to handle issues like timezone errors, missed runs, pauses, resumptions, or minor timing discrepancies. The main concern is ensuring operational recovery, not just when the cron job runs.\n\nFor a reservation that holds for 15 minutes, the expiry time should be calculated once from the accepted reservation time and stored as a UTC instant. Repeatedly adding 15 minutes from the last scheduler run is incorrect, as it extends the hold period based on scheduler delays rather than the original deadline.\n\nWhen troubleshooting, start with four timestamps: created_at, expires_at, claimed_at, and completed_at. The first two represent business state, while the latter two represent processing state. For instance, if reconciliation last completed at 10:02:11Z, execution paused, and resumed at 10:17:46Z, verify that the user's perceived time (like \"9 AM\") was correctly converted to the intended UTC instant at the system boundary. The worker should query using expires_at = database_now, not a formatted date, and the pause should either record a scan cursor or keep the due rows queryable.\n\nThe recovery query should claim all still-open reservations whose persisted deadline is at or before the current database time. It doesn't need to replay imaginary runs for times between ticks, as those were mere opportunities to scan rather than actual business events. Finally, differentiate scheduler fire time, worker start time, and completion time; they are separate latency components, and conflating them as \"jitter\" obscures the actual failure mode. For reservation expiry, schedule frequent reconciliation in UTC to avoid civil-time ambiguity. If user reminders require a local wall-clock promise, keep that presentation schedule separate from the reservation's absolute deadline. Remember, a single timestamp cannot safely represent both semantics; one system can legitimately have both, but the timestamps must not assume both.",
  "summary": "Short answer: treat a cron tick as a prompt to reconcile durable reservation deadlines, not as the event that makes a reservation expire. Store each deadline as an absolute UTC instant, claim due work idempotently, and keep a recovery cursor so a wrong timezone, missed run, pause-resume cycle, or a few seconds of jitter changes delivery latency rather than financial state. The hard constraint is…",
  "key_points": [
    "Cron tick prompts reconciliation of reservation deadlines, not expiration.",
    "Store reservation deadlines as absolute UTC instants, not relative to last run."
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}