#!/usr/bin/env python3 """ Notification Scheduler Script Run this script via cron every 5 minutes: */5 * * * * cd /path/to/app && .venv/bin/python run_notifications.py This will: - Send presence reminders on Thursday at 12:00 (repeat daily until compiled) - Send weekly parking summaries on Friday at 12:00 - Send daily parking reminders at user-configured times - Process queued parking change notifications """ import sys from database.connection import SessionLocal from services.notifications import run_scheduled_notifications def main(): db = SessionLocal() try: print("Running scheduled notifications...") run_scheduled_notifications(db) print("Done.") except Exception as e: print(f"Error: {e}", file=sys.stderr) sys.exit(1) finally: db.close() if __name__ == "__main__": main()