MU
← All Projects
2.4

Automated Shift Report

Robotic Process Automation

A Python script that sends daily shift reports via email with robust retry logic, logging, and automatic draft reset for the next day.

Technology Stack
PythonsmtplibSSL/TLSGmail SMTPLogging
System Architecture
Loading diagram...
Specifications
  • Draft System: Edit shift_report.txt before 11:55 PM to customize message
  • Smart Defaults: Falls back to "No Major Issues" if draft is empty or missing
  • Retry Logic: 3 attempts with exponential backoff (30s, 60s, 90s)
  • Dual Logging: Logs to both file and console with timestamps
  • Auto Reset: Clears draft after sending for next day's report
  • Multi-Recipient: Sends to manager with CC to team members
Design Decisions
ChallengeSolution
Network failures at midnightExponential backoff retry with 60s timeout
Forgetting to write reportDefault message ensures something is always sent
Debugging failed sendsPersistent log file with detailed error types
Reusing yesterday's reportAuto-reset draft to default after successful send
Process Flow
Loading diagram...