Monitoring Scheduled Reports
Scheduled reports include daily sales reports, weekly analytics summaries, and any automated report generation. When these fail, stakeholders don’t get critical business data on time.
Configuration
Section titled “Configuration”Set your API key as an environment variable. For cron jobs, add it to your crontab:
# Edit crontabcrontab -e
# Add at top of crontabPAKYAS_API_KEY=pk_live_xxxxx
# Then your report job0 6 * * 1 pakyas monitor weekly-report -- ruby /scripts/weekly_report.rbOr source from a file:
0 6 * * 1 . ~/.pakyas_env && pakyas monitor weekly-report -- ruby /scripts/weekly_report.rbSee Environment Variables for all options.
When to use this
Section titled “When to use this”- Reports run on a schedule
- Missing a report affects business operations
- Report generation can fail silently
Basic example
Section titled “Basic example”pakyas monitor weekly-report -- ruby report.rbPakyas wraps your report script, monitors execution, and alerts you if the report fails to generate.
Scheduler setup
Section titled “Scheduler setup”# crontab example - runs every Monday at 6am0 6 * * 1 pakyas monitor weekly-report -- ruby /scripts/weekly_report.rbWhat Pakyas detects
Section titled “What Pakyas detects”- Report script exits non-zero
- Report takes longer than expected
- Report never runs (missed schedule)