From 8f45057ba5fbcd513da8656f8bb92085bf2c0516 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Sun, 10 May 2026 10:46:47 -0500 Subject: [PATCH] chore(cron): move recommendation + LLM enrichment to overnight MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DeepSeek API spend isn't justified by minute-by-minute freshness when ops review insights in the morning. Run rules at 02:00 UTC and the enrichment pass at 03:00 UTC so summaries are ready by 9 AM local. - RecommendationsRunWorker: hourly → 02:00 UTC daily - InsightLlmEnrichmentWorker: every 5 min → 03:00 UTC daily --- config/runtime.exs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/config/runtime.exs b/config/runtime.exs index 51f32212..526614ae 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -258,10 +258,14 @@ if config_env() == :prod do {"*/5 * * * *", Towerops.Workers.SystemInsightWorker}, # Wireless client health insights every 5 minutes {"*/5 * * * *", Towerops.Workers.WirelessInsightWorker}, - # Enrich active insights with LLM-generated summaries every 5 minutes - {"*/5 * * * *", Towerops.Workers.InsightLlmEnrichmentWorker}, - # Run multi-source recommendation rules hourly - {"0 * * * *", Towerops.Workers.RecommendationsRunWorker}, + # Run multi-source recommendation rules nightly at 02:00 UTC. + # Fresh insights are ready before the LLM enrichment pass at 03:00. + {"0 2 * * *", Towerops.Workers.RecommendationsRunWorker}, + # Enrich active insights with LLM-generated summaries nightly at + # 03:00 UTC. Batched once a day instead of every 5 minutes — the + # API spend isn't justified by minute-by-minute freshness when + # ops review the dashboard in the morning. + {"0 3 * * *", Towerops.Workers.InsightLlmEnrichmentWorker}, # Gaiia reconciliation insights nightly at 4:30 AM {"30 4 * * *", Towerops.Workers.GaiiaInsightWorker}, # Backhaul capacity utilization insights every 15 minutes