Task
Set up the daily automated hardware health check on the lab machine.
Steps
- Make the script executable:
chmod +x scripts/daily_health_check.sh
- Add to crontab:
crontab -e
# Add this line (runs at 8am daily):
0 8 * * * /path/to/M2_Tracking/scripts/daily_health_check.sh
- Results are saved to
results/health_YYYY-MM-DD_HHMM.log and .xml
What it does
- Runs
pytest tests/test_hardware_health.py -m daily
- Asserts: pressure < 1e-5 mbar, temperature < 4.5 K, laser power within range
- Logs all readings to InfluxDB (visible in Grafana)
- Exits nonzero on failure (can be wired to email/Slack alerts)
Optional: Email notification on failure
Add to crontab:
0 8 * * * /path/to/daily_health_check.sh || mail -s "M2 Health Check FAILED" team@mit.edu < /path/to/results/latest.log
Task
Set up the daily automated hardware health check on the lab machine.
Steps
results/health_YYYY-MM-DD_HHMM.logand.xmlWhat it does
pytest tests/test_hardware_health.py -m dailyOptional: Email notification on failure
Add to crontab: