# Ofelia Job Scheduler Configuration # https://github.com/mcuadros/ofelia # # This file defines the cron-like schedule for all MeshCore Stats tasks. # Jobs run inside the same container (job-local). # ============================================================================= # Data Collection Jobs # ============================================================================= [job-local "collect-companion"] # Collect metrics from companion node (USB serial) schedule = @every 1m command = python /app/scripts/collect_companion.py no-overlap = true [job-local "collect-repeater"] # Collect metrics from repeater node (via LoRa) # Offset by 1 second to avoid USB serial conflicts with companion collection schedule = 1 1,16,31,46 * * * * command = python /app/scripts/collect_repeater.py no-overlap = true # ============================================================================= # Rendering Jobs # ============================================================================= [job-local "render-charts"] # Generate SVG charts from database schedule = @every 5m command = python /app/scripts/render_charts.py [job-local "render-site"] # Generate static HTML site schedule = @every 5m command = python /app/scripts/render_site.py [job-local "render-reports"] # Generate monthly/yearly statistics reports schedule = @daily command = python /app/scripts/render_reports.py # ============================================================================= # Maintenance Jobs # ============================================================================= [job-local "db-maintenance"] # Database VACUUM and ANALYZE for optimal performance # Runs at 3 AM on the 1st of each month schedule = 0 3 1 * * command = python -c "import sqlite3; db=sqlite3.connect('/data/state/metrics.db'); db.execute('VACUUM'); db.execute('ANALYZE'); db.close(); print('Database maintenance complete')"