Skip to content

Add alert-on-failure wrapper for Render cron jobs#583

Merged
claude-ERA merged 1 commit intomainfrom
fix/silent-failure-alerts
Mar 1, 2026
Merged

Add alert-on-failure wrapper for Render cron jobs#583
claude-ERA merged 1 commit intomainfrom
fix/silent-failure-alerts

Conversation

@jonschull
Copy link
Owner

Summary

  • Addresses Audit: identify processes that fail silently without alerting #579
  • Render crons silently swallow non-zero exit codes — nobody finds out when a job fails
  • Adds cron_alert.py wrapper that catches unhandled exceptions and sends an alert email
  • Wired into all 4 Render cron entry points: map-email-cron, bigmap-screenshot-cron, fathom-sync, generate-followups

Test plan

  • Wrapper doesn't affect normal execution (pass-through on success)
  • Alert email is best-effort — failure to send alert doesn't mask the real error
  • Verify alert email arrives when a cron job fails on Render

🤖 Generated with Claude Code

Render crons silently swallow non-zero exit codes. When a cron job fails,
nobody finds out until they manually check. This adds a lightweight wrapper
(cron_alert.py) that catches unhandled exceptions and sends an alert email
to Jon. Wired into all four Render cron entry points:
- map-email-cron (5 min)
- bigmap-screenshot-cron (10 min)
- fathom-sync (daily)
- generate-followups (daily)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jonschull jonschull added the auto-merge Non-strategy change: auto-merge after review PASS label Mar 1, 2026
@claude-ERA claude-ERA merged commit bc120ef into main Mar 1, 2026
1 check passed
@claude-ERA claude-ERA deleted the fix/silent-failure-alerts branch March 1, 2026 23:45
@claude-ERA
Copy link
Collaborator

Auto-merged

PR #583 merged and deployed.

Smoke test: WARNING — see output

Verify: https://era-website.onrender.com

Test output
Traceback (most recent call last):
  File "/Users/admin/era2c/era2/website/tests/smoke_test.py", line 12, in <module>
    from playwright.sync_api import sync_playwright
ModuleNotFoundError: No module named 'playwright'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge Non-strategy change: auto-merge after review PASS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants