🔒 Paid

Cron Job Overlap Double-Run

A nightly batch reconciliation job writes aggregated rows into the daily metrics table on a fixed cron schedule. Tonight, for the first time, the job's own run duration has exceeded its schedule interval — the next scheduled run fired while the previous one was still in progress. The job has no skip-if-running guard, so both instances are now reading overlapping source data and independently writing aggregated output, double-writing the same rows in the daily metrics table. The source orders table itself looks completely healthy — the problem isn't that reads are slow, it's that nothing stops two writers from running at once. Diagnose the missing concurrency control and bring the job back to writing each day's data exactly once.

Difficulty
Senior
Expected Time
~15 min
Category
Data Pipelines

Skills

  • Recognizing overlapping scheduled job runs as a concurrency-control gap, not a performance problem
  • Distinguishing a slow read path from a missing mutual-exclusion guard
  • Recognizing that scaling workers or widening the schedule interval only reduces overlap frequency, not possibility
  • Verifying that output data is written exactly once per scheduled window before handing back

System Architecture

  • Cron Scheduler
  • Nightly Reconciliation Job
  • Source Orders Table
  • Daily Metrics Table

This is a Pro scenario. Upgrade to Pro to unlock it.

Upgrade to ProBack to Incidents