Block 139: Scheduling & Daily Report Script
Combine automation skills into a scheduled reporting script.
Concepts
- schedule library for simple task scheduling
- Combining pandas + report generation + file output
- Email sending with smtplib (conceptual)
- Packaging scripts for daily use
Code Examples
See exercise below.
Exercise
Create a 'daily_report.py' that reads a CSV, computes summary stats, writes a markdown report to 'reports/report_YYYY-MM-DD.md', and can be scheduled with schedule or cron. Add a test: verify the report file is created with correct content.
Homework
Describe the full architecture of a daily automated reporting system for a business. What components would it need?