Skip to content
← All case studies

Automated Alerting Pipeline

Scheduled Python jobs replacing human memory for expiry and off-hire tracking, with automated email alerts before anything is missed.

Python Pandas SMTP Task Scheduling 4 min read

Problem

A number of time-sensitive items — things with expiry dates, or equipment that should be returned or "off-hired" by a certain date — were tracked by someone remembering to check a spreadsheet periodically. This works until it doesn't: a missed check meant a missed expiry or an item sitting on hire for longer than necessary, discovered only when it became a problem.

Constraints

There was no appetite for a new system people had to remember to log into — the whole point was to stop relying on someone remembering to check something. Alerts needed to reach the right person automatically, with enough lead time to act, and needed to stop firing once the item was actually dealt with (no alert fatigue from a system that keeps warning about something already resolved).

Approach

I built a scheduled Python job using pandas to read the relevant tracking data, compute which items were approaching or past their threshold date, and send targeted email alerts via SMTP to the right owner — with different lead times for different item types. The job runs on a schedule rather than waiting to be triggered, so the check itself is now automated and cannot be forgotten.

Outcome

Expiry and off-hire tracking stopped depending on someone remembering to check a spreadsheet. Alerts now reach the responsible person automatically, with enough lead time to act, rather than the item being discovered overdue.

What I'd do differently

I'd add a lightweight acknowledgement step next — a way to mark an alert as "seen and being handled" so the system's own state reflects reality, rather than only suppressing repeat alerts by a time-based cooldown. That would also produce a useful record of how quickly alerts get actioned.

Architecture

The important shift here is from pull (someone has to remember to check) to push (the system tells you, on a schedule, without being asked) — a small change in direction that removes an entire class of “we forgot” failure.